diff --git a/build.gradle b/build.gradle index f063b1c0..75f86c3a 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,9 @@ jar { } java { + // Specify to gradle that the project expects to be built with java 21, but produce output compatible with Java 8 sourceCompatibility = JavaVersion.VERSION_1_8 + toolchain.languageVersion = JavaLanguageVersion.of(21) } test { @@ -129,10 +131,6 @@ dependencies { annotationProcessor "info.picocli:picocli-codegen:${picocliVersion}" } -java { - sourceCompatibility = JavaVersion.VERSION_1_8 -} - compileJava { options.encoding = 'utf-8' }