Jump to content

task :reObf fails with java 8


sequituri

Recommended Posts

Just to see if my project could use some new java features - iterfaces with default methods, method references in lambdas, and such, I set the sourceCompatibility and targetCompatibility = 8 in my build.gradle and tried to build.

 

The build failed and the error is here: (I snipped away the successful stuff)

 

 

14:59:22.177 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :reobf FAILED
14:59:22.183 [iNFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :reobf (Thread[main,5,main]) completed. Took 0.793 secs.
14:59:22.189 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 6.546 secs, idle: 0.098 secs
14:59:22.198 [ERROR] [org.gradle.BuildExceptionReporter]
14:59:22.206 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:59:22.215 [ERROR] [org.gradle.BuildExceptionReporter]
14:59:22.220 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:59:22.225 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':reobf'.
14:59:22.230 [ERROR] [org.gradle.BuildExceptionReporter] > java.lang.IllegalArgumentException (no error message)
14:59:22.802 [ERROR] [org.gradle.BuildExceptionReporter]
14:59:22.807 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:59:22.811 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':reobf'.
14:59:22.815 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActi
onsTaskExecuter.java:69)
14:59:22.820 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTask
Executer.java:46)
14:59:22.824 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecuti
onAnalysisTaskExecuter.java:35)
14:59:22.827 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExec
uter.java:64)
14:59:22.832 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter
.java:58)
14:59:22.836 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySou
rceFilesTaskExecuter.java:42)
14:59:22.841 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoA
ctionsExecuter.java:52)
14:59:22.845 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter
.java:53)
14:59:22.849 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOn
ceTaskExecuter.java:43)
14:59:22.853 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)

14:59:22.857 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(Abstra
ctTaskPlanExecutor.java:79)
14:59:22.861 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(Abstra
ctTaskPlanExecutor.java:63)
14:59:22.866 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPl
anExecutor.java:51)
14:59:22.870 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:2
3)
14:59:22.874 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java
:86)
14:59:22.878 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)

14:59:22.882 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
14:59:22.886 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
14:59:22.890 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
14:59:22.894 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
14:59:22.899 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
14:59:22.903 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
14:59:22.907 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)

14:59:22.911 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
14:59:22.915 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
14:59:22.919 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBui
ldActionExecuter.java:64)
14:59:22.923 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
14:59:22.927 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
14:59:22.931 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.ja
va:35)
14:59:22.935 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.ja
va:26)
14:59:22.940 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
14:59:22.944 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
14:59:22.948 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActio
nFactory.java:201)
14:59:22.952 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActio
nFactory.java:174)
14:59:22.956 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory
.java:170)
14:59:22.960 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory
.java:139)
14:59:22.967 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
14:59:22.971 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
14:59:22.975 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.Main.doAction(Main.java:46)
14:59:22.979 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
14:59:22.983 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.Main.main(Main.java:37)
14:59:22.987 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
14:59:22.991 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
14:59:22.995 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
14:59:22.999 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.IllegalArgumentException
14:59:23.003 [ERROR] [org.gradle.BuildExceptionReporter]        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
14:59:23.007 [ERROR] [org.gradle.BuildExceptionReporter]        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
14:59:23.011 [ERROR] [org.gradle.BuildExceptionReporter]        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)
14:59:23.015 [ERROR] [org.gradle.BuildExceptionReporter]        at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:228)
14:59:23.019 [ERROR] [org.gradle.BuildExceptionReporter]        at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:189)
14:59:23.023 [ERROR] [org.gradle.BuildExceptionReporter]        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.applySpecialSource(ObfArtifact.java:36
7)
14:59:23.027 [ERROR] [org.gradle.BuildExceptionReporter]        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.generate(ObfArtifact.java:336)
14:59:23.031 [ERROR] [org.gradle.BuildExceptionReporter]        at net.minecraftforge.gradle.tasks.user.reobf.ReobfTask.doTask(ReobfTask.java:294)
14:59:23.035 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
14:59:23.039 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskActio
n.doExecute(AnnotationProcessingTaskFactory.java:219)
14:59:23.043 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskActio
n.execute(AnnotationProcessingTaskFactory.java:212)
14:59:23.047 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskActio
n.execute(AnnotationProcessingTaskFactory.java:201)
14:59:23.052 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
14:59:23.056 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
14:59:23.060 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActio
nsTaskExecuter.java:80)
14:59:23.064 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActi
onsTaskExecuter.java:61)
14:59:23.071 [ERROR] [org.gradle.BuildExceptionReporter]        ... 43 more
14:59:23.077 [ERROR] [org.gradle.BuildExceptionReporter]
14:59:23.081 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:59:23.085 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
14:59:23.090 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:59:23.094 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 22.516 secs

 

 

It appears that org.ow2.asm.4x is not compatible with java 8 for the :reObf task to complete properly. There is a 5.0 and 5.0.1 version available that would solve this issue, but I could not figure out how to make gradle use it. Is this a future enhancement, or will Forge always be stuck at 1.6 compatibility?

 

Link to comment
Share on other sites

  • 2 weeks later...

I was able to get Forge Gradle working fine with Java8 - at least on the command line - by adding this snippet to my build.gradle:

 

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'org.ow2.asm' && details.requested.name == 'asm-debug-all' && details.requested.version == '4.1') {
            //prefer different version which contains some necessary fixes
            details.useVersion '5.0.1'
        }
    }
}

 

This makes Gradle use the Java8 compatible version of the asm lib.  I still had some issues with IntelliJ integration (didn't try eclipse).  Forge seems to work, but it gets tons of warnings because the ClassLoader isn't set up correctly.  Running ./gradlew debugClient and remote debugging from IntelliJ seems to work perfectly though.

 

I have no idea if a mod you make with this trick actually works with a binary Forge install, but it at least unblocks debugging until Forge has full support for Java8.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.