Skip to content

Commit 93857a7

Browse files
authored
Switch to JDK 18 as minumum supported version (#29)
* 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
1 parent a7a429d commit 93857a7

File tree

8 files changed

+28
-20
lines changed

8 files changed

+28
-20
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88

9+
strategy:
10+
matrix:
11+
version: [ 18, 19, 20, 21 ]
12+
913
steps:
10-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1115

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

14-
- name: Set up JDK 20
18+
- name: Set up JDK ${{ matrix.version }}
1519
uses: actions/setup-java@v3
1620
with:
1721
distribution: temurin
18-
java-version: 20
22+
java-version: ${{ matrix.version }}
1923

2024
- name: Setup Gradle
2125
uses: gradle/gradle-build-action@v2

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

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

20-
- name: Set up JDK 20
20+
- name: Set up JDK 18
2121
uses: actions/setup-java@v3
2222
with:
2323
distribution: temurin
24-
java-version: 20
24+
java-version: 18
2525

2626
- name: Setup Gradle
2727
uses: gradle/gradle-build-action@v2

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Please remember about specifying the desired version.
4747
Note that simdjson-java follows the [SemVer specification](https://semver.org/), which means, for example, that a major
4848
version of zero indicates initial development, so the library's API should not be considered stable.
4949

50-
We require Java 20 or better.
50+
We require Java 18 or better.
5151

5252
## Benchmarks
5353

@@ -87,4 +87,4 @@ To reproduce the benchmark results, execute the following command:
8787

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

90-
The benchmark may take several minutes. Remember that you need Java 20 or better.
90+
The benchmark may take several minutes. Remember that you need Java 18 or better.

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import me.champeau.jmh.JmhBytecodeGeneratorTask
22
import org.gradle.internal.os.OperatingSystem
33
import org.ajoberstar.grgit.Grgit
44
import java.time.Duration
5-
import jdk.incubator.vector.ByteVector
65

76
plugins {
87
id 'java'
98
id 'scala'
109
id 'me.champeau.jmh' version '0.7.1'
1110
id 'org.ajoberstar.grgit' version '5.2.0'
12-
id 'pl.allegro.tech.build.axion-release' version '1.15.4'
11+
id 'pl.allegro.tech.build.axion-release' version '1.15.5'
1312
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
1413
id 'maven-publish'
1514
id 'signing'
@@ -31,7 +30,7 @@ repositories {
3130

3231
java {
3332
toolchain {
34-
languageVersion = JavaLanguageVersion.of(20)
33+
languageVersion = JavaLanguageVersion.of(18)
3534
}
3635
withJavadocJar()
3736
withSourcesJar()

gradle/wrapper/gradle-wrapper.jar

346 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

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

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
plugins {
2+
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
3+
}
4+
15
rootProject.name = 'simdjson-java'

0 commit comments

Comments
 (0)