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

Make sure compileClasspath is resolved before quarkusGenerateCode task #15454

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

glefloch
Copy link
Member

@glefloch glefloch commented Mar 3, 2021

This fix add a "dependency" on dependency resolution. This make sure all dependencies are resolved before calling the code generation task.

This is needed because, when using included build, there was no guarantee that quarkusGenerateCode was run after included-build build. This was resulting in flaky test reporting a missing jar.

cc @gsmet there should be less failures with this fix.

@glefloch glefloch requested review from gastaldi and aloubyansky March 3, 2021 20:41
@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Mar 3, 2021
*/
@CompileClasspath
public FileCollection getClasspath() {
return QuarkusGradleUtils.getSourceSet(getProject(), SourceSet.MAIN_SOURCE_SET_NAME).getCompileClasspath();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, do you know what it was before this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it was the same. This method declare a dependency on the compile classpath which will make sure that gradle resolve all dependency even included build (which was not always guaranteed). This has no effect on the compile classpath of the task.

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsmet gsmet merged commit 5488d19 into quarkusio:master Mar 4, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 4, 2021
@gsmet
Copy link
Member

gsmet commented Mar 4, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants