Skip to content

Commit

Permalink
Use release flag only on compilers compatible with Java 9
Browse files Browse the repository at this point in the history
  • Loading branch information
fgnm committed Sep 25, 2024
1 parent bbcbb24 commit 19cc80b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ task dist(type: Jar) {
}

tasks.withType(JavaCompile) {
options.compilerArgs += ["--release", "7"]
if (JavaVersion.current().isJava9Compatible()) {
options.compilerArgs += ["--release", "7"]
}
}

jnigen {
Expand Down

0 comments on commit 19cc80b

Please sign in to comment.