Skip to content

Commit

Permalink
Replace AT task dependency workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Oct 1, 2024
1 parent 25298dc commit 803b737
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def getGitCommit = { ->
return stdout.toString().trim()
}

Aw2AtTask.configureDefault(
def aw2at = Aw2AtTask.configureDefault(
getProject(),
layout.projectDirectory.file("src/main/resources/moonrise.accesswidener").getAsFile(),
sourceSets.main
Expand All @@ -28,10 +28,7 @@ Aw2AtTask.configureDefault(
neoForge {
neoFormVersion = "1.21.1-20240808.144430"
validateAccessTransformers = true
}

tasks.named("createMinecraftArtifacts") {
dependsOn("copyAt")
accessTransformers.files.setFrom(aw2at.flatMap { t -> t.getOutputFile() })
}

dependencies {
Expand Down
7 changes: 2 additions & 5 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}
}

Aw2AtTask.configureDefault(
def aw2at = Aw2AtTask.configureDefault(
getProject(),
rootProject.layout.projectDirectory.file("src/main/resources/moonrise.accesswidener").getAsFile(),
sourceSets.main
Expand All @@ -23,6 +23,7 @@ Aw2AtTask.configureDefault(
neoForge {
version = rootProject.neoforge_version
validateAccessTransformers = true
accessTransformers.files.setFrom(aw2at.flatMap { t -> t.getOutputFile() })
runs {
client {
client()
Expand All @@ -35,10 +36,6 @@ neoForge {
}
}

tasks.named("createMinecraftArtifacts") {
dependsOn("copyAt")
}

configurations.implementation {
extendsFrom(configurations.shadow)
}
Expand Down

0 comments on commit 803b737

Please sign in to comment.