Skip to content

Make openapi-generator-gradle-plugin compatible with the Gradle configuration cache #15692

@jprinet

Description

@jprinet
Description

When using the Gradle plugin with configuration cache enabled, the build fails:

Screenshot 2023-05-30 at 3 29 38 PM

This is because usage of project at execution time is not supported.

This occurs at this line which is evaluated if cleanOutput flag is true

openapi-generator version

Latest from master

OpenAPI declaration file content or url

Gradle extension configuration:

openApiGenerate {
    cleanupOutput.set(true)
}
Command line used for generation

Using Gradle 8.1.1 for instance

 ./gradlew clean openApiGenerate --configuration-cache
Steps to reproduce

Run the generation command twice in a row

Related issues/PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions