las2k
(las)
October 25, 2016, 6:25pm
1
I am trying to get composite builds work in a multi-module setup.
child1 and child2 are compile dependent and not compile project dependent. Usually, child1 and child2 are built separately.
Occasionally, i want to build from parent and use composite builds to supply the dependencies.
I tried having a multi-module structure and the children don’t inherit anything from parent and can be built in isolation without parent.
I tried
gradlew --include-build …/child1 :child2:build
I got ‘included build collides with subproject of the same name’ Is there any solution for this problem?
st_oehme
(Stefan Oehme)
October 26, 2016, 8:59am
2
Can you please provide an example on GitHub? From your explanation I can’t yet tell what you are trying to do.
las2k
(las)
October 26, 2016, 1:02pm
3
parent
settings.gradle
rootProject.name='parent’
include 'child1’
include ‘child2’
build.gradle
apply plugin ‘java’
child1
dependencies {
compile ‘group:child2:version’ //comes from artifactory
}
child1 and child2 don’t inherit any settings from parent project to be able to build in isolation.
parent project is in place to allow occasional top down builds.
I want to use composite builds like
parent>gradlew --include-build …/child2 child1:build
I am not able to do so as i am getting
’included build collides with subproject of the same name’
st_oehme
(Stefan Oehme)
October 26, 2016, 1:06pm
4
You are using include
and includeBuild
on the same project. You need to pick one. Either child1 is a sub-project (include
) or it is a standalone build (includeBuild
). It can’t be both.