@@ -36,9 +36,9 @@ sourceSets {
3636 srcDirs = [' src/main/jdk1.15' ]
3737 }
3838 }
39- java21 {
39+ java17 {
4040 java {
41- srcDirs = [' src/main/jdk21 ' ]
41+ srcDirs = [' src/main/jdk17 ' ]
4242 }
4343 }
4444 java25 {
@@ -68,7 +68,7 @@ dependencies {
6868 builtBy compileJava11Java
6969 }
7070
71- java21Implementation files([
71+ java17Implementation files([
7272 sourceSets. main. output. classesDirs,
7373 sourceSets. java9. output. classesDirs,
7474 sourceSets. java11. output. classesDirs,
@@ -81,8 +81,8 @@ dependencies {
8181 sourceSets. java9. output. classesDirs,
8282 sourceSets. java11. output. classesDirs,
8383 sourceSets. java15. output. classesDirs,
84- sourceSets. java21 . output. classesDirs]) {
85- builtBy compileJava21Java
84+ sourceSets. java17 . output. classesDirs]) {
85+ builtBy compileJava17Java
8686 }
8787}
8888
@@ -106,9 +106,10 @@ compileJava15Java {
106106 options. sourcepath = files([' src/main/java' , ' src/main/jdk1.15' ])
107107}
108108
109- compileJava21Java {
110- options. release = 21
111- options. sourcepath = files([' src/main/java' , ' src/main/jdk21' ])
109+ compileJava17Java {
110+ targetCompatibility = 17
111+ sourceCompatibility = 17
112+ options. sourcepath = files([' src/main/java' , ' src/main/jdk17' ])
112113}
113114
114115compileJava25Java {
@@ -132,8 +133,8 @@ task sourcesJar(type: Jar) {
132133 into(' META-INF/versions/15' ) {
133134 from sourceSets. java15. allSource
134135 }
135- into(' META-INF/versions/21 ' ) {
136- from sourceSets. java21 . allSource
136+ into(' META-INF/versions/17 ' ) {
137+ from sourceSets. java17 . allSource
137138 }
138139 into(' META-INF/versions/25' ) {
139140 from sourceSets. java25. allSource
@@ -154,8 +155,8 @@ jar {
154155 into(' META-INF/versions/15' ) {
155156 from sourceSets. java15. output
156157 }
157- into(' META-INF/versions/21 ' ) {
158- from sourceSets. java21 . output
158+ into(' META-INF/versions/17 ' ) {
159+ from sourceSets. java17 . output
159160 }
160161 into(' META-INF/versions/25' ) {
161162 from sourceSets. java25. output
@@ -208,11 +209,11 @@ sourceSets {
208209 }
209210 }
210211
211- test21 {
212+ test17 {
212213 java {
213214 compileClasspath + = main. output + test. output
214215 runtimeClasspath + = test. output
215- srcDir(files(" src/test/jdk21 " ))
216+ srcDir(files(" src/test/jdk17 " ))
216217 }
217218 }
218219
@@ -229,22 +230,22 @@ dependencies {
229230 java9Implementation project(' :core' )
230231 java11Implementation project(' :core' )
231232 java15Implementation project(' :core' )
232- java21Implementation project(' :core' )
233+ java17Implementation project(' :core' )
233234 java25Implementation project(' :core' )
234235}
235236
236237dependencies {
237238 test11Implementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
238239 test15Implementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
239- test21Implementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
240+ test17Implementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
240241 test25Implementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
241242 test11Implementation files(' ../libs/unboundid-ldapsdk-6.0.8.jar' )
242243 test15Implementation files(' ../libs/unboundid-ldapsdk-6.0.8.jar' )
243- test21Implementation files(' ../libs/unboundid-ldapsdk-6.0.8.jar' )
244+ test17Implementation files(' ../libs/unboundid-ldapsdk-6.0.8.jar' )
244245 test25Implementation files(' ../libs/unboundid-ldapsdk-6.0.8.jar' )
245246 test11Implementation(project(" :core" ))
246247 test15Implementation(project(" :core" ))
247- test21Implementation (project(" :core" ))
248+ test17Implementation (project(" :core" ))
248249 test25Implementation(project(" :core" ))
249250 test25Implementation sourceSets. java25. output
250251
@@ -264,9 +265,10 @@ compileTest15Java {
264265 options. sourcepath = files([' src/test/java' , ' src/test/jdk1.15' ])
265266}
266267
267- compileTest21Java {
268- options. release = 21
269- options. sourcepath = files([' src/test/java' , ' src/test/jdk21' ])
268+ compileTest17Java {
269+ targetCompatibility = 17
270+ sourceCompatibility = 17
271+ options. sourcepath = files([' src/test/java' , ' src/test/jdk17' ])
270272}
271273
272274compileTest25Java {
@@ -291,7 +293,7 @@ publishing {
291293configurations {
292294 test11Implementation. extendsFrom testImplementation
293295 test15Implementation. extendsFrom testImplementation
294- test21Implementation . extendsFrom testImplementation
296+ test17Implementation . extendsFrom testImplementation
295297 test25Implementation. extendsFrom testImplementation
296298}
297299
@@ -396,14 +398,14 @@ task test15(type: Test) {
396398 }
397399}
398400
399- task test21 (type : Test ) {
401+ task test17 (type : Test ) {
400402
401- // This is testing the 21 code base
402- onlyIf {System . getenv(" BC_JDK21 " ) != null }
403+ // This is testing the 17 code base
404+ onlyIf {System . getenv(" BC_JDK17 " ) != null }
403405 dependsOn jar
404406
405- testClassesDirs = sourceSets. test21 . output. classesDirs
406- classpath = sourceSets. test21 . runtimeClasspath + files(jar. archiveFile)
407+ testClassesDirs = sourceSets. test17 . output. classesDirs
408+ classpath = sourceSets. test17 . runtimeClasspath + files(jar. archiveFile)
407409
408410 forkEvery = 1 ;
409411 maxParallelForks = 8 ;
@@ -413,10 +415,10 @@ task test21(type: Test) {
413415 testLogging. showStandardStreams = false
414416
415417 javaLauncher = javaToolchains. launcherFor {
416- languageVersion = JavaLanguageVersion . of(21 )
418+ languageVersion = JavaLanguageVersion . of(17 )
417419 }
418420
419- jvmArgs = [' -Dtest.java.version.prefix=21 ' ]
421+ jvmArgs = [' -Dtest.java.version.prefix=17 ' ]
420422
421423
422424 finalizedBy jacocoTestReport
@@ -477,9 +479,9 @@ if (System.getenv("BC_JDK17") != null) {
477479 test. dependsOn(" test15" )
478480}
479481
480- if (System . getenv(" BC_JDK21 " ) != null ) {
481- System . out. println (" ${ project.name} : Adding test21 as dependency for test task because BC_JDK21 is defined" )
482- test. dependsOn(" test21 " )
482+ if (System . getenv(" BC_JDK17 " ) != null ) {
483+ System . out. println (" ${ project.name} : Adding test17 as dependency for test task because BC_JDK17 is defined" )
484+ test. dependsOn(" test17 " )
483485}
484486if (System . getenv(" BC_JDK25" ) != null ) {
485487 System . out. println (" ${ project.name} : Adding test25 as dependency for test task because BC_JDK25 is defined" )
0 commit comments