Skip to content

Gradle plugin assumes the javaCompile will always be forked #2

@PaintNinja

Description

@PaintNinja

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions