Comments (3)
What's your ForgeGradle version? If it's 5, try downgrading it to 4.
from mixingradle.
I'm using the version of gradle and ForgeGradle that come with the newest Forge MDK. It uses Gradle 7.1.1 which is incompatible with older versions of ForgeGradle. Isn't there some way to just remove the first line from the file before the processor runs or better yet for the processor to skip the first line if it starts with that? I can't be the only person having this issue.
from mixingradle.
ForgeGradle 5 comes with a new TSRG format, adding the tsrg2 left right
in the beginning, and adding static
indications to static method mappings. Mixin's Annotation Processor doesn't know how to deal with those.
I fixed it with this workaround:
// Generate a fixed tsrg file after generating the default tsrg file
createMcpToSrg {
outputs.upToDateWhen {false}
doLast {
fixFG5TsrgForMixinAP(output.get().asFile, file("${buildDir}/fixMcpToSrg/output.tsrg"))
}
}
// Tell mixin to use the fixed TSRG file
mixin {
reobfSrgFile = file("${buildDir}/fixMcpToSrg/output.tsrg")
}
// Function that actually fixes the TSRG file
static def fixFG5TsrgForMixinAP(File inFile, File outFile) {
// Make directory if needed
outFile.parentFile.mkdirs()
try (Scanner scanner = new Scanner(inFile); PrintWriter out = new PrintWriter(outFile)) {
boolean firstLine = true
while (scanner.hasNextLine()) {
String next = scanner.nextLine()
// Skip first 'tsrg left right' header line
if (firstLine) {
firstLine = false
continue
}
// Skip 'static' indicators
if (next.trim() == "static") {
continue
}
// Export line otherwise
out.println(next)
}
}
}
See this issue: SpongePowered/Mixin#526
from mixingradle.
Related Issues (20)
- Could not resolve all artifacts for configuration ':classpath'. HOT 1
- RunServer not Configed, AnnotationProcessor Missing, instructions fail.
- Incompatible with Gradle 7 HOT 1
- Incompatible with FG3 HOT 2
- Compatibility with ForgeGradle 5 remapJar Task HOT 1
- When running the IDE command in 1.17, a missing annotation error is thrown. HOT 13
- "gradlew publishToMavenLocal" not working by default
- Refmap doesn't generate HOT 2
- Mixingradle doesn´t exist in the repository HOT 1
- Mixins aren't properly reobfuscated if gradle runs configureReobfTaskFor* task before compileJava HOT 1
- I Want To Build my mod,but gradle can't find mixingradle
- Build failure when applied after the 'eclipse' plugin HOT 3
- Dependent library not found
- 0.7 Compatibility With FG 2.3 Or 0.6 Compatibility With Gradle Higher Than 4.10.3
- Use of jar.archiveName causes issues on gradle 8
- Deprecated VersionNumber is used
- sonarqube fails to due GString args options HOT 1
- Regression: 0.7-SNAPSHOT suddenly breaking IntelliJ IDEA HOT 2
- Can someone fix this issue?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixingradle.