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 task Openapi output not correctly defined #40517

Open
AlanMasciangelo opened this issue May 8, 2024 · 2 comments
Open

Gradle task Openapi output not correctly defined #40517

AlanMasciangelo opened this issue May 8, 2024 · 2 comments
Labels

Comments

@AlanMasciangelo
Copy link

Describe the bug

When QUARKUS_SMALLRYE_OPENAPI_STORE_SCHEMA_DIRECTORY is set, Gradle does not appear to know about the openapi files being an output of the quarkusBuild task. If you delete the openapi files, gradle will not recreate them on a rerun of quarkusBuild as it believes it is UP-TO-DATE. This can be problematic when combined with gradle's incremental build and build cache

Expected behavior

When QUARKUS_SMALLRYE_OPENAPI_STORE_SCHEMA_DIRECTORY is set, the output is considered part of the gradle task output. If that output is deleted, the gradle task would be considered out of date.

Actual behavior

The gradle task is still considered UP-TO-DATE

How to Reproduce?

No response

Output of uname -a or ver

MINGW64_NT-10.0-19045

Output of java -version

17.0.5

Quarkus version or git rev

3.10

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.7

Additional information

No response

@quarkus-bot
Copy link

quarkus-bot bot commented May 8, 2024

/cc @EricWittmann (openapi), @MikeEdgar (openapi), @glefloch, @phillip-kruger (openapi), @quarkusio/devtools

@AlanMasciangelo
Copy link
Author

I was able to work around this by explicitly adding it as an gradle task output when smallrye-openapi.store-schema-directory is set

project.tasks.named("quarkusAppPartsBuild") {
    outputs.dir("${project.buildDir}/openapi")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant