tony
06/01/2026, 10:24 PMtasks.withType<JavaCompile>().configureEach {
options.release = 11
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}Jendrik Johannes
06/02/2026, 6:35 AMrelease as it is to the java extension. We ended up not doing it, because we wanted to do something "better" that fits well with toolchains and replaces sourceCompatibility / targetCompatibility as well.
But I don't think this "better" solution was ever done. 😕
I always use
tasks.withType<JavaCompile>().configureEach {
options.release = 11
}Jendrik Johannes
06/02/2026, 6:38 AMMartin
06/02/2026, 9:07 AMoptions.release not working on Android (because Android has no rt.jar ) and a bunch of other stufftony
06/02/2026, 7:25 PMtony
06/02/2026, 7:25 PMMartin
06/02/2026, 9:47 PMMartin
06/02/2026, 9:47 PMMartin
06/02/2026, 9:48 PMcheckDependencies part is a bit fragile because…. it’s hard to automatically get all outgoing variants in a random project.Martin
06/02/2026, 9:48 PMtony
06/03/2026, 3:50 PMMartin
06/03/2026, 3:52 PMMartin
06/03/2026, 3:52 PMRyan Schmitt
06/16/2026, 2:59 PM--release like this one, plus the lack of coverage for JDK-internal classes. I almost always set options.release but sometimes I have to resort to toolchains