> is there any example somewhere?
Here is what I do in "settings.gradle":
rootDir.eachDir { possibleSubprojectDir ->
possibleSubprojectDir.eachFileMatch FILES, ~/subprojects\.gradle/, {
subprojectsSpecificationScript ->
apply from: subprojectsSpecificationScript
}
possibleSubprojectDir.eachFileMatch FILES, ~/build\.gradle/, { buildFile ->
subprojectName = possibleSubprojectDir.name
include subprojectName
subprojectPath = ':' + subprojectName
subproject = project(subprojectPath)
subproject.projectDir = possibleSubprojectDir
}
}
I add "subprojects.gradle" to each directory of which I want to scan the
subdirectories for project. An explicit indication that a directory needs to be
scanned is needed, because scanning the whole directory tree takes too long.
The above snippet is currently repeated in all "subprojects.gradle" files. This
results in all subprojects being a direct descendant of the root projects. But
it should be easy to change the above code to use the actual directory
structure as the project structure.
--
Regards, Johan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email