aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-03-16 21:07:06 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2026-03-16 21:07:06 +0100
commit411484a33f6fa407de332ec9eddf8ecb65ee078c (patch)
tree4e4d64fb1c8de84aa1d99036204e762f99a92199 /build.gradle
parent28e2e6e284445f72514be092855285fd8291cbb5 (diff)
feat(): support java 1.21.11
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle23
1 files changed, 6 insertions, 17 deletions
diff --git a/build.gradle b/build.gradle
index 6ecb14b..d34a196 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'fabric-loom' version '1.7-SNAPSHOT'
+ id 'fabric-loom' version '1.15-SNAPSHOT'
id 'maven-publish'
}
@@ -52,32 +52,21 @@ processResources {
}
}
-def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
- // ensure that the encoding is set to UTF-8, no matter what the system default is
- // this fixes some edge cases with special characters not displaying correctly
- // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
- // If Javadoc is generated, this must be specified in that task too.
+ it.options.release = 21
it.options.encoding = "UTF-8"
- if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
- it.options.release.set(targetJavaVersion)
- }
}
java {
- def javaVersion = JavaVersion.toVersion(targetJavaVersion)
- if (JavaVersion.current() < javaVersion) {
- toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
- }
- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
- // if it is present.
- // If you remove this line, sources will not be generated.
withSourcesJar()
+
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
jar {
from("LICENSE") {
- rename { "${it}_${project.archivesBaseName}" }
+ rename { "${it}_${inputs.properties.archivesName}"}
}
}