Skip to content

Commit 6bd879c

Browse files
authored
Specify in Gradle the minimum supported Java version (#30)
1 parent 9213e69 commit 6bd879c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ repositories {
2929
}
3030

3131
java {
32-
toolchain {
33-
languageVersion = JavaLanguageVersion.of(18)
32+
// It seems that specifying the minimum supported Java version while allowing the use of newer
33+
// ones isn't possible in Gradle. To test the library against multiple Java versions, the
34+
// workaround proposed in https://github.com/gradle/gradle/issues/16256 has been applied:
35+
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_18)) {
36+
toolchain {
37+
languageVersion = JavaLanguageVersion.of(18)
38+
}
3439
}
3540
withJavadocJar()
3641
withSourcesJar()

settings.gradle

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

0 commit comments

Comments
 (0)