-
Notifications
You must be signed in to change notification settings - Fork 858
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
Provide an option for disabling errorprone for a smoother dev experience #3380
Conversation
tasks { | ||
withType<JavaCompile>().configureEach { | ||
with(options) { | ||
errorprone { | ||
enabled = (disableErrorProne != "true") |
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.
We had an issue in build scripting once of comparing a boolean to the string "true"
cause issues so want to stop this admittedly lazy pattern that you might have copied from the other repo.
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.
what was the issue that PR solved? Trying to understand how it would end up a boolean and not as a string...
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.
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 the problem is properties are Object
, not String
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.
right. In this particular narrow case it probably doesn't matter much, since it's a string if you put it on the command line or in your gradle.properties, but there's no reason not to be extra careful about it anyway.
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.
one difference between the impl over in the instrumentation repo is that you're pulling from gradle.startParameters.projectProperties
and I'm pulling from properties
. Yours is actually a String, whereas mine is an Object, so I don't have a toBoolean()
method unless I cast it to a String.
Why did you pull from startParameters
, btw? When I used that pattern, it didn't seem to pick up my personal gradle.properties
in the .gradle directory in my home directory, where as just using properties
directly did.
Just
-PdisableErrorProne=true
or put it in your personal gradle.properties file.