Skip to content

Commit

Permalink
Merge pull request #141 from MattSturgeon/1.19/accesstransformer
Browse files Browse the repository at this point in the history
Cleanup aw->at config
  • Loading branch information
hashalite authored Dec 30, 2023
2 parents ab3522c + 55311ac commit 04d7f36
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.fabricmc.loom.task.RemapJarTask
import net.fabricmc.loom.util.aw2at.Aw2At

plugins {
id "com.github.johnrengelman.shadow"
Expand All @@ -15,22 +14,11 @@ architectury {

loom {
forge {
convertAccessWideners = true
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name

mixinConfig "freecam-common.mixins.json"
mixinConfig "freecam-forge.mixins.json"
}
}

afterEvaluate {
// FIXME: arch-loom only does this for tasks.remapJarTask,
// meaning our variant tasks don't get AccessTransformers.
tasks.withType(RemapJarTask).each {
Aw2At.setup(project, it)
}
}

configurations {
common
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
Expand Down Expand Up @@ -131,6 +119,10 @@ variants.each { variant ->
inputFile = shadowJarTask.archiveFile
dependsOn shadowJarTask
archiveAppendix = appendix

// Transform the AccessWidener into an AccessTransformer
atAccessWideners.add loom.accessWidenerPath.get().asFile.name

// Output in root `build/libs`
destinationDirectory = rootProject.layout.buildDirectory.dir "libs"
}
Expand Down

0 comments on commit 04d7f36

Please sign in to comment.