Skip to content

Commit

Permalink
Specify in Gradle the minimum supported Java version (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrrzysko authored Nov 12, 2023
1 parent 9213e69 commit 6bd879c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ repositories {
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(18)
// It seems that specifying the minimum supported Java version while allowing the use of newer
// ones isn't possible in Gradle. To test the library against multiple Java versions, the
// workaround proposed in https://github.com/gradle/gradle/issues/16256 has been applied:
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_18)) {
toolchain {
languageVersion = JavaLanguageVersion.of(18)
}
}
withJavadocJar()
withSourcesJar()
Expand Down
4 changes: 0 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

rootProject.name = 'simdjson-java'

0 comments on commit 6bd879c

Please sign in to comment.