aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorisxander <xander@isxander.dev>2024-05-27 14:30:25 +0100
committerisxander <xander@isxander.dev>2024-05-27 14:30:25 +0100
commitb8261c444d27fc20b87b1e39365238e80b751005 (patch)
tree19ab5d3bfaf6eccc26bd2056a828d2c11dd7677c /build.gradle.kts
parent046b72ae8aad3a9ff228ff087385fd868fe32dbc (diff)
downloadYetAnotherConfigLib-b8261c444d27fc20b87b1e39365238e80b751005.tar.gz
YetAnotherConfigLib-b8261c444d27fc20b87b1e39365238e80b751005.tar.bz2
YetAnotherConfigLib-b8261c444d27fc20b87b1e39365238e80b751005.zip
Fix access widener not converting to access transformer on NeoForge
Diffstat (limited to 'build.gradle.kts')
-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)
+ }
}
}