(I don't want to bump 4yo thread so I'm creating this one.)
My mod is throwing an exception, but the line the exception is pointing to is an empty line with a } ending the if statement in my source code. Probably mod jar is obfuscated automatically, so I want to turn it off.
Comment above suggests to paste such code to build.gradle after minecraft block:
task deobfJar(type: Jar) { // Generate deobfuscated
from sourceSets.main.output
classifier = 'deobf'
}
task sourceJar(type: Jar) { // Generate sources
from sourceSets.main.allSource
classifier = 'sources'
}
tasks.build.dependsOn('sourceJar', 'deobfJar')
artifacts {
archives deobfJar
archives sourceJar
archives jar
}
However, IntelliJ shows the error "Cannot infer argument type", and gradlew b throws a MissingPropertyException: Could not find property '?' on task ':deobfJar'.
How to fix it?