TwoStone / gradle-eclipse-compiler-plugin

9 stars 9 forks source link

Java 9 support #2

Closed Hugobros3 closed 5 years ago

Hugobros3 commented 6 years ago

Pretty self-explanatory, using Gradle 4.5.1 and Java 9.0.4 it is not possible to compile my project using source level 1.9. Here's the error log

zsalab commented 6 years ago

I think the ecj 4.6.1 just does not support Java9. I have not tried but maybe you should check out this repo instead of try the released plugin from gradle plugin repo. The https://github.com/TwoStone/gradle-eclipse-compiler-plugin/pull/1 pull request merged but not released (to bump the ecj for new version which should support Java 9)

I can not promise it will solve the problem. Feedback welcome.

TwoStone commented 6 years ago

I've published version 1.3.0 in the plugin portal, which uses the newest eclipse compiler for java. Please have a try with it.

hlapidez commented 6 years ago

Seems not to work.

I got: Could not target platform: 'Java SE 9' using tool chain: 'Eclipse Compiler for Java 3.13.100(1.8)' My fault. Gradle was running on 1.8

Running on java 1.9 with ecj 3.13.100:

Compiling java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.BinaryModuleBinding.create(BinaryModuleBinding.java:64) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getModuleFromAnswer(LookupEnvironment.java:427)

After set ecj Version to project.extensions.ecj.toolVersion='3.14.0'

it seems to work.

zsalab commented 6 years ago

I have improved the configurability and upgraded the default ECJ version to 3.15.1 with the pull request #4 I guess this issue can be closed after the new release

TwoStone commented 5 years ago

I've published version 1.4.1 on the plugin portal. Closing this issue for now, please report if there are ongoing problems with that.