-
Notifications
You must be signed in to change notification settings - Fork 33
Could not get unknown property 'errorprone' for object of type org.gradle.api.tasks.compile.CompileOptions. #3
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
Comments
I cannot reproduce; can you share a project that reproduces the issue? What other plugins are you using? (including the built-in ones such as the |
I thought it could be because of another plugin. And yes, it is. Adding |
jmhCompileGeneratedClasses {
ErrorProneJavacPlugin.apply(options)
options.annotationProcessorPath = configurations.errorprone
} Then you'll be able to use See the note about “custom |
…and only enable Error Prone where we used to create the extension. This means that custom JavaCompile tasks (such as the one created by the 'me.champeau.gradle.jmh' plugin, see issue #3) now have the extension and can be configured in a tasks.withType(JavaCompile) closure, but that configuration will be ignored unless Error Prone is explicitly enabled on those tasks. Also, remove the ErrorProneJavacPlugin.apply() API; plugin needs to be applied to be useful (not only present in the build classpath)
Fwiw, I just published v0.4 that applies the jmhCompileGeneratedClasses {
options.annotationProcessorPath = configurations.errorprone
options.errorprone.enabled = true
} README has been updated. (also please note that |
I've been using the other plugin until now (
net.ltgt.errorprone
) but I decided to give this one a try with JDK9. I only changeid 'net.ltgt.errorprone' version '0.0.14'
toid 'net.ltgt.errorprone-javacplugin' version '0.2'
and addoptions.errorprone.disableWarningsInGeneratedCode = true
in mytasks.withType(JavaCompile)
and I get the error from the title:I'm not sure what I am doing wrong. Any ideas?
P.S. JDK 9.0.4 and Gradle 4.7.
The text was updated successfully, but these errors were encountered: