aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle.kts23
1 files changed, 16 insertions, 7 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index f551c2f..9bd118d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -53,8 +53,9 @@ val testmod by sourceSets.creating {
runtimeClasspath += sourceSets.main.get().runtimeClasspath
}
+val accessWidenerName = "yacl.accesswidener"
loom {
- accessWidenerPath.set(rootProject.file("src/main/resources/yacl.accesswidener"))
+ accessWidenerPath.set(rootProject.file("src/main/resources/$accessWidenerName"))
runConfigs.all {
ideConfigGenerated(false)
@@ -228,13 +229,21 @@ java {
sourceCompatibility = JavaVersion.VERSION_17
}
-tasks.withType<JavaCompile> {
- options.release.set(findProperty("java.version")!!.toString().toInt())
-}
+tasks {
+ withType<JavaCompile> {
+ options.release.set(findProperty("java.version")!!.toString().toInt())
+ }
-tasks.withType<KotlinCompile> {
- kotlinOptions {
- jvmTarget = findProperty("java.version")!!.toString()
+ withType<KotlinCompile> {
+ kotlinOptions {
+ jvmTarget = findProperty("java.version")!!.toString()
+ }
+ }
+
+ remapJar {
+ if (isNeoforge) {
+ atAccessWideners.add(accessWidenerName)
+ }
}
}