@@ -57,13 +57,13 @@ subprojects {
5757
5858 plugins.withType<JavaPlugin > {
5959 extensions.configure<JavaPluginExtension > {
60- sourceCompatibility = JavaVersion .VERSION_11
61- targetCompatibility = JavaVersion .VERSION_11
60+ sourceCompatibility = JavaVersion .VERSION_17
61+ targetCompatibility = JavaVersion .VERSION_17
6262 }
6363
6464 tasks.withType<JavaCompile >().configureEach {
6565 options.encoding = " UTF-8"
66- options.release.set(11 )
66+ options.release.set(17 )
6767 }
6868
6969 tasks.withType<Javadoc >().configureEach {
@@ -81,7 +81,7 @@ subprojects {
8181
8282 plugins.withId(" org.jetbrains.kotlin.jvm" ) {
8383 tasks.withType<KotlinCompile >().configureEach {
84- compilerOptions.jvmTarget.set(JvmTarget .JVM_11 )
84+ compilerOptions.jvmTarget.set(JvmTarget .JVM_17 )
8585 }
8686 }
8787}
@@ -342,10 +342,26 @@ project(":scip-java") {
342342 }
343343 }
344344
345+ // Emit the javac --add-exports flags as a ready-to-use, space-separated
346+ // string so the Docker wrapper script can read them with a plain `cat`,
347+ // keeping gradle/javac-internals.properties the single source of truth.
348+ val generateJavacJvmOptions = tasks.register(" generateJavacJvmOptions" ) {
349+ val output = layout.buildDirectory.file(" generated/distribution/javac-jvm-options" )
350+ val options = javacJvmOptions.joinToString(" " )
351+ inputs.property(" options" , options)
352+ outputs.file(output)
353+ doLast {
354+ val file = output.get().asFile
355+ file.parentFile.mkdirs()
356+ file.writeText(" $options \n " )
357+ }
358+ }
359+
345360 extensions.configure<DistributionContainer > {
346361 named(" main" ) {
347362 contents {
348363 from(generateDistributionVersion)
364+ from(generateJavacJvmOptions)
349365 }
350366 }
351367 }
@@ -455,7 +471,7 @@ project(":scip-snapshots") {
455471 rootProject.layout.projectDirectory.dir(" scip-snapshots/expected/kotlin/common" ).asFile.absolutePath,
456472 " snapshot.case.kotlin-common.targetroot" to kotlinTargetroot.get().asFile.absolutePath,
457473 " snapshot.case.kotlin-common.aggregateNoEmitInverseRelationships" to " true" ,
458- " scip.jdk.version" to " 11 " ,
474+ " scip.jdk.version" to " 17 " ,
459475 )
460476
461477 tasks.named<Test >(" test" ) {
0 commit comments