understanding-gradle
understanding-gradle copied to clipboard
Artifact Transformer. Asm(java 8) cannot parse java module info(java 9+) classes
Hello! I need assistance in resolving an issue related to artifact transformation in Gradle. I've encountered an error due to ASM (Java 8) being unable to process classes with Java module information (Java 9+). If you have the opportunity to analyze the code and identify potential issues, I would appreciate your help. Thank you! snippets of code: build.gradle - https://hastebin.com/share/nujemijoyu.javascript buildSrc/src/main/groovy/org/example/JavaModuleTransform.groovy - https://hastebin.com/share/ofiwevahow.java Errors: https://pastebin.com/pbnBXt0C Java 8 Gradle 8.1.1
Hi @NikitaFeaucher. The error you shared looks like the problem is not (directly) related to artifact transforms. The stack points at ASMModParser
:
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2]
at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?]
That is using a very old version of ASM here (asm-debug-all-5.2). You should try to upgrade that somehow. ideally to asm-9.6
– implementation("org.ow2.asm:asm:9.6")
. Unfortunately from what you shared I cannot see how this all plays together in your project.
Can you maybe share a complete reproducer project that I can try out?