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

Generator plugin does not support incremental compilation #161

Open
dalewking opened this issue Sep 3, 2021 · 2 comments
Open

Generator plugin does not support incremental compilation #161

dalewking opened this issue Sep 3, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@dalewking
Copy link

dalewking commented Sep 3, 2021

Using the latest gradle, I see this warning in the build:

Execution optimizations have been disabled for task ':wfmShared:xxxxxxxxXxxxxApiOpenApiGenerate' to ensure correctness due to the following reasons:

@Alex009 Alex009 added the bug Something isn't working label Mar 4, 2022
@dalewking
Copy link
Author

This is an easy thing to fix. Just don't use a Java lambda. My current workaround is to not use the normal configuration mechanism and define my on generate task in build.gradle.kts:

val generateTask: GenerateTask = tasks.create(
    "generate",
    GenerateTask::class.java
) {
...
    // The standard generate task adds a doFirst block implemented with a Java lambda
    // which does not work well with gradle because it disables execution optimizations
    // forcing the task to run every time and output a big warning to that effect.
    // See: https://docs.gradle.org/7.2/userguide/validation_problems.html#implementation_unknown
    // The effect of these two lines is to replace the Java lambda block with a Kotlin one
    actions.removeAt(0)
    doFirst { file(outputDir.get()).deleteRecursively() }
}

@dalewking
Copy link
Author

The error message did go away so this is not really an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants