@nx/gradle and composite builds #23095
Closed
juan-abril
started this conversation in
Feature Requests
Replies: 2 comments
-
Thanks for the feedback. We'll look into this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
this issue has been fixed. please see the example here: https://github.com/xiongemi/nx-gradle-composite-build there is a migration scirpt packages/gradle/src/migrations/19-4-0/add-project-report-all.ts if you want to migrate manually, in every build file, add below code
if using grovy, in build.gradle:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@nx/gradle and composite builds
Hi Team, good morning, In
Gradle
, there are two ways to structure a project:multi-module
project orcomposite builds
. I know the plugin is currently working withmulti-module
projects, but I would like to ask for support forcomposite builds
.Not ask for root build.gradle
I think you are asking for the root
build.gradle
file to include theproject-report
plugin in all Gradle projects. However, sometimes the monorepo has different languages, not just Java or Gradle. Maybe we could add an option to the plugin to not ask for the root build.gradle and leave the responsibility of adding theproject-report
plugin to the developer.Discover Gradle projects dynamically
I think the plugin is currently asking for the root
build.gradle
file to discover the Gradle projects. However, in a monorepo, the projects are not always in the rootbuild.gradle
file. I suggest adding a way to discover the Gradle projects dynamically. For example, the plugin already has a way to get all thebuild.gradle
files in the workspace. Maybe we could use that to discover the Gradle projects.Example of workspace
Dependency Tree
Composite Build
I noticed that for
multi-module
you are asking for the following pattern:dep.startsWith('project ')
and+--- project :number-utils
. In composite build, the dependency report has a different pattern. For example:+--- com.example:number-utils -> project :number-utils
. I suggest adding another if statement to support that.Thank guys for the plugin.
Beta Was this translation helpful? Give feedback.
All reactions