Questions tagged [multi-project]
308 questions
173
votes
16 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,035
- 2
- 15
- 8
82
votes
3 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
- 1,916
- 3
- 18
- 27
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
- 9,456
- 11
- 66
- 111
47
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
- 6,867
- 8
- 26
- 37
32
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
- 429
- 1
- 6
- 11
29
votes
4 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
- 2,842
- 5
- 26
- 45
24
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
- 776
- 1
- 8
- 19
22
votes
1 answer
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
- 18,063
- 3
- 33
- 53
18
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,257
- 14
- 26
18
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
- 765
- 5
- 16
14
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
- 7,667
- 15
- 55
- 97
13
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
- 815
- 3
- 13
- 29
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,268
- 3
- 14
- 29
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
- 8,745
- 5
- 43
- 81
9
votes
1 answer
Gradle: How to share common tasks in multiproject build?
In my root build.gradle file I apply common tasks for all components:
apply from: rootProject.file('common/component.gradle')
In subproject i define componentTitle:
ext {
componentTitle = 'application1'
}
component.gradle:
jar {
manifest…
isobretatel
- 3,318
- 6
- 27
- 41