-
Notifications
You must be signed in to change notification settings - Fork 135
Java compilation warnings and errors are no longer limited to the first 100 #1890
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
Conversation
Generate changelog in
|
| project.getTasks().withType(JavaCompile.class).configureEach(javaCompileTask -> { | ||
| List<String> compilerArgs = javaCompileTask.getOptions().getCompilerArgs(); | ||
| // Avoid overriding options that have already been set | ||
| if (!compilerArgs.contains(MAX_WARNINGS_ARG)) { |
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.
Would we want this to work if people override after applying the plugin too? If so, we'd probably want to put this in a project.afterEvaluate to run after people have had a chance to change it.
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.
I think it does, but only due to the fact later arguments take precedence over earlier instances. The afterEvaluate will be cleaner :-)
Note that the same potential duplication can occur if commandlineargumentproviders are used because I'm not checking those, we take advantage of knowing they're applied after the fixed args. I figured we don't want to evaluate providers unnecessarily as part of this check due to potential side-effects given the worst case result still has the desired behavior.
|
Released 4.22.0 |
==COMMIT_MSG==
Java compilation warnings and errors are no longer limited to the first 100
==COMMIT_MSG==