Questions tagged [gradle-multi-project-build]
39 questions
76
votes
2 answers
Gradle subproject name different than folder name
I have a couple of subprojects that are part of a multi-project build (flat hierarchy). I want to set the name on them to be different than their folder name. However, in include (settings.gradle) it has to have the folder name otherwise it won't…

Greg Hill
- 2,148
- 2
- 23
- 27
18
votes
3 answers
Gradle multi project build with empty projects
When applying a multi-project Gradle structure to our project, my settings.gradle looks like this:
include "source:compA:api"
include "source:compA:core"
include "source:compB"
gradle projects give me
Root project 'tmp'
\--- Project ':source'
…

VolkerK
- 1,412
- 13
- 28
9
votes
2 answers
Configure Kotlin extension for Gradle subprojects
I'm setting up a multi-module Gradle project based on Kotlin for the JVM. Since the root project does not contain any code, the Kotlin plugin should only be applied to subprojects.
build.gradle.kts (root project)
plugins {
kotlin("jvm") version…

ooy10478
- 93
- 1
- 4
7
votes
2 answers
How to use Gradle "platforms" to align dependency versions in a multi-project setup?
I am trying to learn how to use “platforms” to align dependency versions between projects in a multi-project setup. So far I’ve…

Learner
- 1,215
- 1
- 11
- 26
5
votes
0 answers
Gradle Multi-Project Build - How to handle local npm project dependencies
The project is building an Angular application.
I need the App build to use the result of another local project which is a javascript library.
Gradle is used to build both projects with the help of com.github.node-gradle.node node plugin.
The…

Loudsi
- 81
- 1
- 7
4
votes
4 answers
How to ignore gradle build of root project for a multi-project Kotlin Spring Boot application?
Background:
I currently have a multi-module (multi-project) application repo. The "root" is not a runnable application. It's merely the source directory where I have a root build.gradle.kts file which holds the dependencies and plugins that are…

drix
- 177
- 3
- 9
3
votes
0 answers
Gradle Composite Build: How to configure Tasks for all included builds
I am new to gradle composite builds. I have a multi-project build that uses precompiled script plugins in order to have tasks configured for all projects that include the plugin. Now I want to port that functionality to a composite build setup.
The…

code_name
- 73
- 8
3
votes
1 answer
How to build only submodules of a gradle parent module?
I am desperately trying to build only submodules of a gradle module.
This is my current struture:
root
|_ foo
|_egg
|_nogg
|_ bar
|_celona
When I run
gradle :foo:egg:build
It builds the submodule.
I want it to build all two submodules…

xetra11
- 7,671
- 14
- 84
- 159
2
votes
0 answers
How to share kotlin multiplatform targets between submodules?
After an eternity I managed to setup a kotlin multi-platform and multi-module project. As there is almost no proper guide or documentation, I have just one more issue I couldn't solve.
Can I share kotlin multiplatform targets between the…

Andrew
- 1,109
- 1
- 15
- 27
2
votes
1 answer
api configuration of java-library plugin is not recognized
I am new to Gradle and i am using Gradle 6.1.
I am writing small application to understand the concepts of multi project Application and Java-Library plugin of Gradle.
My Question is :
How App.java is running perfectly fine without importing…

kverma28
- 57
- 1
- 13
2
votes
1 answer
Gradle build: how to set up a multilevel project (3+ levels)?
I am having troubles with seting up 3 level gradle multi-project:
Level_1_Proj
│
├── Level_2_Proj_A
│ │
│ ├── Level_3_Proj_C
│ └── Level_3_Proj_D
│
└── Level_2_Proj_B
│
├── Level_3_Proj_E
└── Level_3_Proj_F
I would like to be…

Talavera316
- 69
- 4
2
votes
1 answer
How to add dependencies to tests of another project in a multi-platform multi-project Kotlin build
I have a multi-platform Kotlin project, which contains multiple modules (subprojects). The Building Multiplatform Projects with Gradle documentation of Kotlin clearly shows how to set up project dependencies between modules:
kotlin {
sourceSets…

Steven Jeuris
- 18,274
- 9
- 70
- 161
1
vote
0 answers
How to copy gradle dependencies from a subproject in a multi-project build?
I have a Java library built with gradle for which I would like to modify the repositories it reads from and publishes to, without changing it the original library files.
So, I created a new project library (lib-internal) which is just overriding the…

87VN0
- 775
- 3
- 10
1
vote
1 answer
Multi-project Gradle+Kotlin: How to create Jar containing all sub-projects using Kotlin DSL?
I have a Gradle project with two subprojects. The parent does not contain any code; all the Kotlin code is in the two subprojects. All Gradle build files are defined in the Kotlin DSL.
Upon building, Gradle generates two JAR files, one in the build…

Madoc
- 5,841
- 4
- 25
- 38
1
vote
0 answers
Run a single Gradle task without dependency tasks
What are ways to minimize Gradle runtime when running a single task that is known to have no task dependencies on a project containing many sub-projects (over 100) where just configuration phase takes over 80 seconds? Most time is wasted in…

czerny
- 15,090
- 14
- 68
- 96