rootProjectName="myProject"
include ':sub1:foo'
include ':sub2:foo'
So here we have four subprojects!
:sub1
:sub1:foo
:sub2
:sub2:foo
When declaring the --sub-project one has to pass the sub project name without the path (eg --sub-project=foo). It would be cleaner and actually more correct to use the full project path --sub-project=:sub1:foo.
Gradle exposes this in the Project class.
Projects are arranged into a hierarchy of projects. A project has a name, and a fully qualified path which uniquely identifies it in the hierarchy.
https://github.com/snyk/snyk-gradle-plugin/blob/9989b21137695bedc5182f551e6d3299e6eebb23/lib/init.gradle#L248
Gradle multiproject setup can be nested. One can setup the following structure:
The
settings.gradle
could look like this:So here we have four subprojects!
:sub1
:sub1:foo
:sub2
:sub2:foo
When declaring the
--sub-project
one has to pass the sub project name without the path (eg--sub-project=foo
). It would be cleaner and actually more correct to use the full project path--sub-project=:sub1:foo
. Gradle exposes this in theProject
class.see: https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getPath--