mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Update to JDK 17 (#1394)
Everything still targets JDK 8 (non-records) or JDK 16 (records only)
This commit is contained in:
@@ -29,9 +29,10 @@ val java16 by sourceSets.creating {
|
||||
}
|
||||
|
||||
tasks.named<JavaCompile>("compileJava16Java") {
|
||||
// We use JDK 17 for latest but target 16 for maximum compatibility
|
||||
javaCompiler.set(
|
||||
javaToolchains.compilerFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(16))
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
)
|
||||
options.release.set(16)
|
||||
|
@@ -18,7 +18,14 @@ plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
// Target 16 to ensure minimum compatibility
|
||||
options.release.set(16)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user