From bf5ea271831eac8c12323eec7fd0e161269822fc Mon Sep 17 00:00:00 2001 From: stephengold Date: Wed, 3 Jul 2024 23:24:53 -0700 Subject: [PATCH] build for compatibility with Java 11 --- apps/build.gradle.kts | 7 +++---- library/build.gradle.kts | 8 +++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/build.gradle.kts b/apps/build.gradle.kts index 851f092..57ccbad 100644 --- a/apps/build.gradle.kts +++ b/apps/build.gradle.kts @@ -5,8 +5,8 @@ plugins { } java { - sourceCompatibility = JavaVersion.VERSION_19 - targetCompatibility = JavaVersion.VERSION_19 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } application { @@ -43,13 +43,12 @@ tasks.withType().all { // Java compile-time options: options.compilerArgs.add("-Xdiags:verbose") options.compilerArgs.add("-Xlint:unchecked") options.encoding = "UTF-8" - options.release = 19 + options.release = 11 options.setDeprecation(true) // to provide detailed deprecation warnings } tasks.withType().all { // Javadoc runtime options: (options as CoreJavadocOptions).apply { - addStringOption("-release", "19") } } diff --git a/library/build.gradle.kts b/library/build.gradle.kts index eb5383a..7504d90 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -15,8 +15,8 @@ val javaVersion = JavaVersion.current() val websiteUrl = "https://github.com/stephengold/kk-physics" java { - sourceCompatibility = JavaVersion.VERSION_19 - targetCompatibility = JavaVersion.VERSION_19 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } dependencies { @@ -32,17 +32,15 @@ configurations.all { } tasks.withType().all { // Java compile-time options: - options.compilerArgs.add("--enable-preview") options.compilerArgs.add("-Xdiags:verbose") options.compilerArgs.add("-Xlint:unchecked") options.encoding = "UTF-8" - options.release = 19 + options.release = 11 //options.setDeprecation(true) // to provide detailed deprecation warnings } tasks.withType().all { // Javadoc runtime options: (options as CoreJavadocOptions).apply { - addStringOption("-release", "19") } }