Questions tagged [multi-project]
319 questions
208
votes
17 answers
Multi-project test dependencies with gradle
I have a multi-project configuration and I want to use gradle.
My projects are like this:
Project A
-> src/main/java
-> src/test/java
Project B
-> src/main/java (depends on src/main/java on Project A)
-> src/test/java (depends on…

mathd
- 2,415
- 2
- 17
- 8
89
votes
5 answers
Require Gradle project from another directory
I have a directory/project setup like this:
C:\
_dev\
Projects\
Logger
MyProject
Logger is an Android library project using Gradle. MyProject is a standard Android project project that needs to make use of the…

Euan T
- 2,041
- 3
- 20
- 28
61
votes
2 answers
Gradle and Multi-Project structure
I'm trying to understand how should I approach the following project setup:
┌Top Android Project
│
├── Project 1 - (Pure Java Modules)
│ │
│ ├── Module A1
│ ├── Module B1
│ :
│ └── Module Z1
│
├── Project 2 - (Android Libraries…

TacB0sS
- 10,106
- 12
- 75
- 118
55
votes
6 answers
Multiple settings gradle files for multiple projects building
I have the following project structure
-->Starnderd Location
-->Project1
-->settings.gradle
-->build.gradle
-->Subproject11
-->build.gradle
-->Subproject12
…

Isuru
- 7,893
- 8
- 30
- 38
44
votes
5 answers
Gradle exclude a specific subproject from full build
In our Gradle project, we want to add a new module for functional-tests that needs to be able to access dependencies from other subprojects but still not be run as part of the full project build. If I try this, it still gets built:
def…

Paddy
- 3,472
- 5
- 29
- 48
36
votes
1 answer
Gradle nested multi-projects with project compile dependencies
I have an identical problem to this Gradle Multi-Module Project Setup but I have to use project compile dependencies to build and cannot use the library(jar) dependencies solution that was given as a solution in the above question.
Root
|__ P1
| …

meja
- 479
- 1
- 6
- 11
25
votes
2 answers
Gradle - Recursive subprojects
Assume I wanted to use Gradle with a project structure such as:
RootProject
\-- SubProjectA
\-- SubProjectAA
\-- SubProjectAB
How I would I achieve this?
What I tried is pretty straightforward. I've created all directories, with a structure…

Matija Folnovic
- 906
- 2
- 10
- 22
23
votes
2 answers
Gradle multiproject gives "Could not find property 'sourceSets' on project" error
I had quite good gradle configuration, that built everything just fine. But one of the projects of my multi-project build derived from the rest of them so much, that I would gladly move it to another git repo and configure submodules to handle…

Mateusz Kubuszok
- 24,995
- 4
- 42
- 64
21
votes
5 answers
Gradle multi project distribution
I'm trying to make a dist of a multi project build. The root project looks something like this:
apply plugin: 'distribution'
version 1.0
distributions {
main {
baseName = 'someName'
contents {
from 'nodes'
…

Sason Ohanian
- 795
- 5
- 16
19
votes
1 answer
Gradle: How to configure multiproject setup with side-by-side projects
We have an old project that is set up like this:
.
├── customizationProject
│ ├── ejb
│ └── services
├── projectA
│ ├── ejb
│ └── shared
├── projectB
│ └── ejb
└── projectC
├── ejb
└── services
The idea is that the…

kungfoo
- 1,297
- 1
- 14
- 27
18
votes
2 answers
Gradle's publishToMavenLocal task is not executed correctly
I'm trying to create a gradle based multi-module project. There is also an project that contains different gradle scripts that enables pluggable build configurations. One of those scripts is for publishing artifacts to maven repository. This is the…

Rade Milovic
- 965
- 4
- 13
- 29
15
votes
2 answers
Gradle multiproject define dependency on root project
I have a multi project gradle build, configured in this way:
root
|
|---- projectA
|
|---- projectB
I want to declare in the root/build.gradle a dependency for all nested projects, this is the file:
subprojects {
version =…

rascio
- 8,968
- 19
- 68
- 108
11
votes
2 answers
Access restrictions in Eclipse Multiple Projects with Gradle
I have a Gradle Project in Eclipse consisting of multiple subprojects. I currently have subprojects A, B and C.
Project A should have access to Project B. Project B should have access to Project C. But project A should not have access to Project…

Boris van Katwijk
- 2,998
- 4
- 17
- 32
11
votes
5 answers
How do you handle multiple (overlapping) projects in trac?
We are using trac and are really satisfied with it. However, out of the box, trac is best suited for single-project environments only. I'd be interested to hear about the various approaches people take to make it work with multiple projects…

Oliver Giesen
- 9,129
- 6
- 46
- 82
11
votes
3 answers
How to clean buildSrc dir from root project in Gradle?
I have multiproject build in the buildSrc dir.
buildSrc
---build
--- subProject1
----build (2)
--- subProject2
----build (3)
--- subProject3
----build (4)
--- subProject4
…

Xelian
- 16,680
- 25
- 99
- 152