error: invalid flag: -XepAllErrorsAsWarnings #89
-
Hi, I am using gradle 6.8.1 and java 11. I init a gradle app project, and try to use this gradle-errorprone-plugin. it works fine until I want to make all errors showing and dot break the compile. My configuration is as bellow: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
plugins { repositories { dependencies {
} application { // import net.ltgt.gradle.errorprone.errorprone tasks.withType(JavaCompile).configureEach { |
Beta Was this translation helpful? Give feedback.
-
then I run as ./gradlew assemble, I got an error:
Can somebody help me out? |
Beta Was this translation helpful? Give feedback.
-
Your build script should read: tasks.withType(JavaCompile).configureEach {
options.errorprone {
disableWarningsInGeneratedCode = true
allErrorsAsWarnings = true
// disable("ParameterName", "CatchFail")
}
} (i.e. you shouldn't even need the |
Beta Was this translation helpful? Give feedback.
-XepAllErrorsAsWarnings
is not a compiler argument, it's an Error Prone argument (to be passed whitespace-separated as part of the-Xplugin:ErrorProne
compiler argument); but you shouldn't have to use it when using the plugin (that's the whole idea).Your build script should read:
(i.e. you shouldn't even need the
CheckSeverity
enum)