Closed davidjohnstonverint closed 3 days ago
Does this work for you?
It works in my test setup, but it is really simple and I'm not sure if this is enough to prove that it is working. :-)
I just added the lombok plugin to a sample project without any other change. It showed the message and I was able to fix it with this modified setup:
// build.gradle
afterEvaluate {
def processSpring = tasks.named ('processSpring')
sourceSets.main.java.srcDir (processSpring)
compileJava.dependsOn (processSpring)
}
id 'io.freefair.lombok' version '8.10' id 'org.openapi.generator' version '7.8.0'
compileJava.dependsOn tasks.openApiGenerate
gradle run
Task :app:openApiGenerate FAILED
FAILURE: Build failed with an exception.
What went wrong: A problem was found with the configuration of task ':app:openApiGenerate' (type 'GenerateTask').
Reason: Task ':app:generateEffectiveLombokConfig' uses this output of task ':app:openApiGenerate' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
@fizlrock your error is from a different project:
'org.openapi.generator'
this project is called openapi-processor and the gradle plugin name is:
"io.openapiprocessor.openapi-processor"
@fizlrock I think what @hauner meant was that you should go to https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin and create an issue there instead of in this github repository.
I've got the same issue after upgrading the plugin version by the way 😄 .
EDIT: It seems this is triggered by the latest lombok plugin release: https://github.com/freefair/gradle-plugins/releases/tag/8.10.
@Sax388 Thanks. That's what I was trying to say.. :-)
We started using the Lombok plugin for gradle rather than pulling in the dependencies and setting things up manually:
id 'io.freefair.lombok' version '6.4.2'
The result is the following warning in the gradle output and
processSpring
ends up being run on every gradle task (presumably because Gradle is unable to determine that it is already up to date.I found the same issue raised against another gradle plugin and the reason was due to the dependencies not being modeled correctly within the plugin (https://github.com/Netflix/dgs-codegen/issues/190). Is this something that can be fixed within this gradle plugin too?