Open dalewking opened 2 years ago
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() }
}
The error message did go away so this is not really an issue.
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: