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

Better gradle composite build support #29234

Closed
tomas1885 opened this issue Nov 13, 2022 · 1 comment · Fixed by #37938
Closed

Better gradle composite build support #29234

tomas1885 opened this issue Nov 13, 2022 · 1 comment · Fixed by #37938
Labels
area/gradle Gradle kind/bug Something isn't working
Milestone

Comments

@tomas1885
Copy link
Contributor

Describe the bug

When using Quarkus on a composite build gradle project I noticed a couple of issues:

  1. When including a multi-module gradle project as a composite build the dependency loading doesn't actually work.
  2. Hot reloading doesn't work for composite builds (source directory isn't watched).
  3. Using a local extension as a composite builds doesn't work

The current method of loading an included build in the Quarkus gradle plugin requires the included build to have a flat hierarchy, which prevents including a multi-module build, plus the workspacedirectory is never added to the dependency index.
I modified the Quarkus application gradle plugin and managed to get it working with both composite builds and multi-module projects. I have a branch for this "fix", tested on multiple project structures, if someone is willing to take a look and see if I haven't miss anything important. Thanks.

Here's the PR link:
#29233

Expected behavior

Using composite builds in gradle should work regardless of the project structure hierarchy, same for extensions

Actual behavior

Using composite builds either doesn't pick up the required dependency, and if it does (when using flat module structure) hot reloading doesn't work for them.
Local extension local dependencies aren't picked up as deployment dependencies.

How to Reproduce?

Create a composite build project with the following structure with a quarkus app depending on another multimodule gradle project

Output of uname -a or ver

No response

Output of java -version

openjdk 11.0.13 2021-10-19

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

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

Gradle 7.5.1

Additional information

No response

@tomas1885 tomas1885 added the kind/bug Something isn't working label Nov 13, 2022
@quarkus-bot quarkus-bot bot added the area/gradle Gradle label Nov 13, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 13, 2022

/cc @glefloch, @quarkusio/devtools

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.

1 participant