aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-08 12:44:50 +0200
committerLinnea Gräf <nea@nea.moe>2024-08-08 12:44:50 +0200
commitc1dabe37d8b43d90a682edde797df9b278ec4a47 (patch)
tree08b712083aa77affee15da3aeaca38d268311eb7 /build.gradle.kts
parentb96ba8a968bffc99f8749d13d8b5fc38b0f3f565 (diff)
downloadforge1.8.9template-master.tar.gz
forge1.8.9template-master.tar.bz2
forge1.8.9template-master.zip
Add access transformersHEADmaster
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 93ce3eb..686fe0f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,6 +15,7 @@ val mcVersion: String by project
val version: String by project
val mixinGroup = "$baseGroup.mixin"
val modid: String by project
+val transformerFile = file("src/main/resources/accesstransformer.cfg")
// Toolchains:
java {
@@ -44,6 +45,10 @@ loom {
pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
// If you don't want mixins, remove this lines
mixinConfig("mixins.$modid.json")
+ if (transformerFile.exists()) {
+ println("Installing access transformer")
+ accessTransformer(transformerFile)
+ }
}
// If you don't want mixins, remove these lines
mixin {
@@ -99,6 +104,8 @@ tasks.withType(org.gradle.jvm.tasks.Jar::class) {
// If you don't want mixins, remove these lines
this["TweakClass"] = "org.spongepowered.asm.launch.MixinTweaker"
this["MixinConfigs"] = "mixins.$modid.json"
+ if (transformerFile.exists())
+ this["FMLAT"] = "${modid}_at.cfg"
}
}
@@ -112,7 +119,7 @@ tasks.processResources {
expand(inputs.properties)
}
- rename("(.+_at.cfg)", "META-INF/$1")
+ rename("accesstransformer.cfg", "META-INF/${modid}_at.cfg")
}