Handle java source/target defined at extension level#188
Handle java source/target defined at extension level#188jdneo merged 1 commit intomicrosoft:developfrom
Conversation
There is an issue about this: #175. I also did some investigation and turns out the copy constructor is not needed for running. I'm thinking that, for debugging purpose, maybe override Update: The copy constructor is required. If we remove all the copy constructor, here: The sourceset is a proxy wrapperred type, and it will encounter some problem |
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/JavaLanguageModelBuilder.java
Outdated
Show resolved
Hide resolved
Shall I leave my changes to |
I think you can leave as it is. Until we find a way to get rid of the copy constructor entirely |
|
I think we should use AFAIK, there are three different kind of ways to set the source/target level. The current approach cannot get the version in case 2. While using the Considering |
|
Hi @Arthurm1, would you like to update the PR? Or do you have any concern about |
|
@jdneo Will look at it this weekend and probably change the PR |
|
@Arthurm1 Thank you. My thought is that we can just simply get the source/target level from JavaCompile, no need to inspecting from compile args. (Correct me if this is working for any cases) |
755fdef to
e686901
Compare
|
@jdneo I've changed it so that the source/target compatibility is populated purely from the This seems to reflect more how people use the Gradle settings, i.e. set source/target compatibility in |
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/JavaLanguageModelBuilder.java
Show resolved
Hide resolved
|
Thank you @Arthurm1 |

This will take into account the
java pluginsource/target compatibility settings.e.g. using...
instead of
I'm not sure if this is enough to fix redhat-developer/vscode-java#3721. The source/target compatibility in
JVMBuildTargetwill have changed but the javac options will still contain--release 8. Hopefully that will be ok for the eclipse settings.I note that here it says to configure the
compileJavatask with source/target and not thejavaplugin when usingJabelI've also extended the
POJOconstructor copying used inDefaultSourceSetsto the language extensions. It's not needed for normal running but it's a pain when debugging as all the variables/watches just show the proxy classes.