Skip to content

Commit

Permalink
build for compatibility with Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jul 4, 2024
1 parent cfb3cbc commit bf5ea27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 3 additions & 4 deletions apps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

application {
Expand Down Expand Up @@ -43,13 +43,12 @@ tasks.withType<JavaCompile>().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<Javadoc>().all { // Javadoc runtime options:
(options as CoreJavadocOptions).apply {
addStringOption("-release", "19")
}
}

Expand Down
8 changes: 3 additions & 5 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -32,17 +32,15 @@ configurations.all {
}

tasks.withType<JavaCompile>().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<Javadoc>().all { // Javadoc runtime options:
(options as CoreJavadocOptions).apply {
addStringOption("-release", "19")
}
}

Expand Down

0 comments on commit bf5ea27

Please sign in to comment.