Skip to content

Commit

Permalink
Switch to JDK 18 as minumum supported version (#29)
Browse files Browse the repository at this point in the history
* Drop minimum supported JDK version to 18

Set up matrix build, for versions 18 to 21

* Drop publish to JDK 18 and don't require adoptium

* Update README.md
  • Loading branch information
deejay1 authored Oct 23, 2023
1 parent a7a429d commit 93857a7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
version: [ 18, 19, 20, 21 ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 20
- name: Set up JDK ${{ matrix.version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 20
java-version: ${{ matrix.version }}

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 20
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 20
java-version: 18

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Please remember about specifying the desired version.
Note that simdjson-java follows the [SemVer specification](https://semver.org/), which means, for example, that a major
version of zero indicates initial development, so the library's API should not be considered stable.

We require Java 20 or better.
We require Java 18 or better.

## Benchmarks

Expand Down Expand Up @@ -87,4 +87,4 @@ To reproduce the benchmark results, execute the following command:

```./gradlew jmh -Pjmh.includes='.*ParseAndSelectBenchmark.*'```

The benchmark may take several minutes. Remember that you need Java 20 or better.
The benchmark may take several minutes. Remember that you need Java 18 or better.
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import me.champeau.jmh.JmhBytecodeGeneratorTask
import org.gradle.internal.os.OperatingSystem
import org.ajoberstar.grgit.Grgit
import java.time.Duration
import jdk.incubator.vector.ByteVector

plugins {
id 'java'
id 'scala'
id 'me.champeau.jmh' version '0.7.1'
id 'org.ajoberstar.grgit' version '5.2.0'
id 'pl.allegro.tech.build.axion-release' version '1.15.4'
id 'pl.allegro.tech.build.axion-release' version '1.15.5'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'maven-publish'
id 'signing'
Expand All @@ -31,7 +30,7 @@ repositories {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(20)
languageVersion = JavaLanguageVersion.of(18)
}
withJavadocJar()
withSourcesJar()
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

rootProject.name = 'simdjson-java'

0 comments on commit 93857a7

Please sign in to comment.