diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-05-14 16:47:22 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-05-14 16:47:22 +0300 |
commit | 2d728715798c14302c1c8279e1bf6f229955d920 (patch) | |
tree | c6e9d3e31d26a0d6b575a4682a0cceb2a2ced8aa | |
parent | 089f424d264839664d5d2e89a71e2ae9e8a46250 (diff) | |
download | LibGui-2d728715798c14302c1c8279e1bf6f229955d920.tar.gz LibGui-2d728715798c14302c1c8279e1bf6f229955d920.tar.bz2 LibGui-2d728715798c14302c1c8279e1bf6f229955d920.zip |
Simplify source/target compatibility setting
The build has to use Java 17 because of the Loom version.
-rw-r--r-- | build.gradle | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/build.gradle b/build.gradle index 3c6c313..e6d9f0e 100644 --- a/build.gradle +++ b/build.gradle @@ -106,22 +106,9 @@ processResources { java { withSourcesJar() withJavadocJar() -} -allprojects { - plugins.withId('java') { // when the java plugin is applied in the project - java { - // Use Java 17 toolchain if running on older version of Java, but allow newer versions - if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } - } else { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - } - } + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } tasks.withType(JavaCompile) { |