File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,9 +51,6 @@ subprojects {
5151 apply plugin : ' java-library'
5252 apply plugin : ' org.inferred.processors'
5353
54- sourceCompatibility = JavaVersion . VERSION_11
55- targetCompatibility = JavaVersion . VERSION_11
56-
5754 tasks. withType(Checkstyle ). configureEach {
5855 enabled = false
5956 }
@@ -71,7 +68,7 @@ subprojects {
7168}
7269
7370javaVersions {
74- libraryTarget = 21
71+ libraryTarget = 17
7572 runtime = 21
7673}
7774
Original file line number Diff line number Diff line change @@ -11,3 +11,12 @@ dependencies {
1111 testImplementation ' org.junit.jupiter:junit-jupiter'
1212 testImplementation ' com.fasterxml.jackson.core:jackson-databind'
1313}
14+
15+ tasks. withType(JavaCompile ). named(' compileJava' ) {
16+ sourceCompatibility = JavaVersion . VERSION_11
17+ targetCompatibility = JavaVersion . VERSION_11
18+ }
19+
20+ javaVersion {
21+ target = 21
22+ }
Original file line number Diff line number Diff line change @@ -41,6 +41,15 @@ moduleJvmArgs {
4141 ' jdk.compiler/com.sun.tools.javac.api' )
4242}
4343
44+ tasks. withType(JavaCompile ). named(' compileJava' ) {
45+ // By setting the source and target compatibility to 11, while still using a higher level
46+ // JDK for compilation, we can compile against the AST classes we need to support >11 source
47+ // features but still run on 11 JDKs (with the addition of checking the java version at runtime
48+ // and dynamically loading the correct formatter implementation)
49+ sourceCompatibility = JavaVersion . VERSION_11
50+ targetCompatibility = JavaVersion . VERSION_11
51+ }
52+
4453// false positives due to org.junit.runners.* in the test cases
4554tasks. named(" checkJUnitDependencies" ) {
4655 enabled = false
@@ -51,3 +60,7 @@ tasks.named("test") {
5160 // https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution
5261 systemProperty ' junit.jupiter.execution.parallel.mode.default' , ' concurrent'
5362}
63+
64+ javaVersion {
65+ target = 21
66+ }
You can’t perform that action at this time.
0 commit comments