The Gradle plugin causes an IllegalAccessError on the compileJava task when setup as documented in the readme. The issue is that the plugin assumes this task will always be forked but never checks or enables forking when a post processor plugin is added.
A workaround is to manually enable forking of the JavaCompile task after adding the post processor:
tasks.named('compileJava', JavaCompile) {
javacPostProcessor { PostProcessorExtension extension ->
extension.plugins.add('my-post-processor')
}
// required by dev.lukebemish.javac-post-processor
options.fork = true
}
The Gradle plugin causes an IllegalAccessError on the compileJava task when setup as documented in the readme. The issue is that the plugin assumes this task will always be forked but never checks or enables forking when a post processor plugin is added.
A workaround is to manually enable forking of the JavaCompile task after adding the post processor: