On 27/08/10 9:15 AM, Kelly Robinson wrote:
I'm working with a project that's stitching together a bunch of modules through
svn:externals commonly checked out into a 'known' structure. This means that I
can't introduce code at the root directory of the checkout, unfortunately, and
that seems to be the standard way of describing a hierarchical multiproject
java build in Gradle.
Is there anyway that a settings.gradle file, and consequently all of the
related modules, can refer to sibling directories in the project layout? For
example:
-\module1
-\module2
-\...
-\gradleRoot
One option is to add a directory called 'master', and put the settings
file in there. Then, you use the includeFlat() method to add sibling
directories:
includeFlat 'module1', 'module2'
This is just short hand for adding a project called 'module1' whose
project directory is '../module1'
Regardless of whether you use include() or includeFlat(), you can
further customise the layout in the settings script. For example:
rootProject.children.each { project ->
project.projectDir = new File(rootDir, "subprojects/$project.name")
project.buildFileName = "${project.name}.gradle"
}
Some more detail is available in the user guide:
http://gradle.org/0.9-rc-1/docs/userguide/build_lifecycle.html#sec:multi_project_builds
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email