TwoStone / gradle-eclipse-compiler-plugin

9 stars 9 forks source link

Gradle 6 sets "-h" compiler-arg that is not supported by eclipse jdt compiler #11

Open 38leinaD opened 4 years ago

38leinaD commented 4 years ago

This plugin is no longer working with Gradle 6; gives "Unrecognized option : -h"

Steps to reproduce:

Error:

    > Task :compileJava FAILED
    Caching disabled for task ':compileJava' because:
      Build cache is disabled
    Task ':compileJava' is not up-to-date because:
      Task has failed previously.
    The input changes require a full rebuild for incremental task ':compileJava'.
    Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
    Compiling sources using eclipse compiler for java [org.eclipse.jdt:ecj:3.15.1]
    Starting process 'command '/home/daniel/.sdkman/candidates/java/8.0.202-amzn/bin/java''. Working directory: /home/daniel/junk/testproj Command: /home/daniel/.sdkman/candidates/java/8.0.202-amzn/bin/java -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/daniel/.gradle/caches/modules-2/files-2.1/org.eclipse.jdt/ecj/3.15.1/c7157b8cfed49d457fb65976e3646f011c88a962/ecj-3.15.1.jar org.eclipse.jdt.internal.compiler.batch.Main @/home/daniel/junk/testproj/build/tmp/compileJava/java-compiler-args.txt
    Successfully started process 'command '/home/daniel/.sdkman/candidates/java/8.0.202-amzn/bin/java''
    Unrecognized option : -h
    :compileJava (Thread[Execution worker for ':' Thread 4,5,main]) completed. Took 0.252 secs.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':compileJava'.
    > Process 'command '/home/daniel/.sdkman/candidates/java/8.0.202-amzn/bin/java'' finished with non-zero exit value 255

eclipse jdt compiler gives: "Unrecognized option : -h"

re-thc commented 3 years ago

https://github.com/gradle/gradle/issues/12904#issuecomment-619212927 has a fix from Gradle