-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate java compiler args #109
Conversation
30f5ea9
to
bdb4d00
Compare
@Arthurm1 Thank you so much for the contribution! Since there is a lot of PRs pending, it's gonna take some time for review, please allow us some time :) again, thanks so much! |
@Arthurm1 meanwhile, feel free us to let us know if you have any feedback using the product, anything is useful to us, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the Checkstyle violations, this change looks good to me.
With this PR merged, looks like we can get rid of
and recover the source and target compatibility from the compiler args. I'll do that later.
bdb4d00
to
57652a8
Compare
Fixed checkstyle issues |
Since it's using internal apis, there might be chances to meet Do we have public utils that can be used? If not, considering adding a try-catch block and use the original implementation as a fallback. |
57652a8
to
0cf99dd
Compare
I've wrapped the code in try-catch as there are no public classes that create the full args list. The other option is to duplicate the I've added more tests as I wasn't handling the I've added code to cope with Groovy's use of |
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/SourceSetsModelBuilder.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/SourceSetsModelBuilder.java
Show resolved
Hide resolved
plugin/src/main/java/com/microsoft/java/bs/gradle/plugin/SourceSetsModelBuilder.java
Show resolved
Hide resolved
0cf99dd
to
ac32e28
Compare
Hopefully I've addressed all your points. The source and target compatibility are now both set from the compiler args. Before, if a build had set the source/target directly in the args, then the compatibility settings would be wrong. I've added to the tests to check for both these issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I should probably add a test for toolchains as well, in case they set the source/target/release in a different manner
Would you like to add a toolchain test in this PR? I'm both ok if merging the PR as it is.
ac32e28
to
9b91b7c
Compare
@jdneo I've added a toolchain test. No other changes. Hopefully good to merge now |
Thank you @Arthurm1! |
Populate the missing javac options - before it was the only the additional used specified options that appeared.