Skip to content

Commit

Permalink
added expect platform agent to run tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jan 21, 2025
1 parent eb2f73a commit 3c0fbc9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ tasks.named('compileJava', JavaCompile) {
source(project(":antimatter-common").sourceSets.main.allSource)
}

tasks.withType(JavaExec).configureEach {
expectPlatform.insertAgent(it, "fabric", [
"xyz/wagyourtail/unimined/expect/annotation/Environment": "net/fabricmc/api/Environment",
"xyz/wagyourtail/unimined/expect/annotation/Environment\$EnvType": "net/fabricmc/api/EnvType",])
}

sourcesJar {
mustRunAfter copyAccessWidener
from(project(':antimatter-common').sourceSets.main.allSource){
Expand Down
10 changes: 7 additions & 3 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ neoForge {
}
server {
server()
/*expectPlatform.insertAgent(it, "forge", ["xyz/wagyourtail/unimined/expect/annotation/Environment": "net/minecraftforge/api/distmarker/OnlyIn",
"xyz/wagyourtail/unimined/expect/annotation/Environment\$EnvType": "net/minecraftforge/api/distmarker/Dist",
"xyz/wagyourtail/unimined/expect/annotation/Environment\$EnvType.SERVER": "DEDICATED_SERVER",])*/
}
}
mods {
Expand Down Expand Up @@ -93,6 +90,13 @@ tasks.named('compileJava', JavaCompile) {
source(project(":antimatter-common").sourceSets.main.allSource)
}

tasks.withType(JavaExec).configureEach {
expectPlatform.insertAgent(it, "forge", [
"xyz/wagyourtail/unimined/expect/annotation/Environment" : "net/minecraftforge/api/distmarker/OnlyIn",
"xyz/wagyourtail/unimined/expect/annotation/Environment\$EnvType" : "net/minecraftforge/api/distmarker/Dist",
"xyz/wagyourtail/unimined/expect/annotation/Environment\$EnvType.SERVER": "DEDICATED_SERVER",])
}

processResources {
from project(":antimatter-common").sourceSets.main.resources
inputs.property "version", project.mod_version
Expand Down

0 comments on commit 3c0fbc9

Please sign in to comment.