Skip to content
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

Gradle plugin prevents incremental compilation for Groovy #906

Open
jimmypoms opened this issue Dec 12, 2023 · 1 comment
Open

Gradle plugin prevents incremental compilation for Groovy #906

jimmypoms opened this issue Dec 12, 2023 · 1 comment
Labels
lang: groovy Issues or features specific to Groovy status: awaiting feedback

Comments

@jimmypoms
Copy link

Expected Behavior

Applying the micronaut gradle plugins should allow groovy incremental compilation.

Actual Behaviour

When applying any of the micronaut gradle plugins, a bunch of annotation processors are added to the groovy source sets. This disables incremental compilation for groovy.

Steps To Reproduce

  1. Create demo app for groovy https://micronaut.io/launch/
  2. Enable incremental compilation by adding the following snippet to the root build.gradle
tasks.withType(GroovyCompile) {
    options.incremental = true
}
  1. Compile groovy with ./gradlew compileGroovy
  2. The build errors with
Enabling incremental compilation and configuring Java annotation processors for Groovy compilation is not allowed. Disable incremental Groovy compilation or remove the Java annotation processor configuration.

Environment Information

No response

Example Application

No response

Version

4.2.1

@sdelamo
Copy link
Contributor

sdelamo commented Feb 5, 2024

@jimmypoms

You can suppress automatic dependencies:

micronaut {
    // The Micronaut plugins can automatically add dependencies to your project. If, for some reason,
    // a dependency shouldn't be automatically added, you can add its coordinates to this set.
    // The format is "group:name". It must not include the version.
    ignoredAutomaticDependencies.add("io.micronaut.data:micronaut-data-processor")
    ignoredAutomaticDependencies.add("io.micronaut.jaxrs:micronaut-jaxrs-processor")
    ignoredAutomaticDependencies.add("io.micronaut.micrometer:micronaut-micrometer-annotation")
    ignoredAutomaticDependencies.add("io.micronaut.microstream:micronaut-microstream-annotations")
    ignoredAutomaticDependencies.add("io.micronaut.openapi:micronaut-openapi")
    ignoredAutomaticDependencies.add("io.micronaut.security:micronaut-security-annotations")
    ignoredAutomaticDependencies.add("io.micronaut.serde:micronaut-serde-processor")
    ignoredAutomaticDependencies.add("io.micronaut.spring:micronaut-spring-annotation")
    ignoredAutomaticDependencies.add("io.micronaut.tracing:micronaut-tracing-annotation")
    ignoredAutomaticDependencies.add("io.micronaut.validation:micronaut-validation-processor")

}

Does it help?

@sdelamo sdelamo added the lang: groovy Issues or features specific to Groovy label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: groovy Issues or features specific to Groovy status: awaiting feedback
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants