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

In a Gradle Quarkus application build, quarkusGenerateCode triggers a deprecation warning when sourcesJar is enabled #27259

Closed
jskillin-idt opened this issue Aug 11, 2022 · 4 comments · Fixed by #27764
Labels
area/gradle Gradle kind/bug Something isn't working
Milestone

Comments

@jskillin-idt
Copy link
Contributor

jskillin-idt commented Aug 11, 2022

Describe the bug

In a simple Quarkus app build, by simply enabling sources JAR, Gradle produces deprecation warnings:

java {
    withSourcesJar()
}

This is a sample of the error:
Reason: Task ':app:sourcesJar' uses this output of task ':app:quarkusGenerateCode' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

Reproducer: https://github.com/jskillin-idt/quarkusio-quarkus-issues-27259

Output of uname -a or ver

Linux jacob-ubuntu-dev 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-122.04) OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-122.04, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.11.2.Final

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

Gradle 7.4.1

Additional information

No response

@jskillin-idt jskillin-idt added the kind/bug Something isn't working label Aug 11, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 11, 2022

/cc @glefloch, @quarkusio/devtools

@quarkus-bot quarkus-bot bot added the area/gradle Gradle label Aug 11, 2022
@jskillin-idt
Copy link
Contributor Author

I've added a reproducer.

@jskillin-idt
Copy link
Contributor Author

It's possible compileJava is also affected. I'll need to make a reproducer to verify, however.

@glefloch
Copy link
Member

Right, We need to catch those warning without breaking the compatibility with gradle 6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants