Reputation: 33
I get an error when trying to build using gradle.
What does this error mean?
E:\intellij-project\MyProject>gradle build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
> Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`. Use the `CompileOptions.annotationProcessorPath` property instead.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
E:\intellij-project\MyProject>
Upvotes: 1
Views: 532
Reputation: 14500
This is a change made in Gradle 4.5 that became a breaking change in Gradle 5.0:
You should not put annotation processors on the compile classpath or declare them with the -processorpath compiler argument.
They should be added to the annotationProcessor configuration instead. If you don’t want any processing, but your compile classpath contains a processor unintentionally (e.g. as part of a library you depend on), use the -proc:none compiler argument to ignore it.
Upvotes: 1