spring-security/settings.gradle

81 lines
1.8 KiB
Groovy
Raw Normal View History

rootProject.name = 'spring-security'
rootProject.children.each {project ->
//assert project.projectDir.isDirectory()
//assert project.buildFile.isFile()
}
def String[] modules = [
2015-03-23 12:14:26 -04:00
'core',
'data',
'remoting',
'web',
'ldap',
'acl',
'config',
'cas',
'openid',
'taglibs',
'aspects',
'crypto',
'messaging',
'test'
]
include modules
modules.each {name ->
2015-03-23 12:14:26 -04:00
def p = findProject(":${name}")
p.name = "spring-security-${name}"
p.buildFileName = "${name}.gradle"
}
def String[] itest = [
'web',
'context'
]
include itest
itest.each { name ->
2015-03-23 12:14:26 -04:00
def p = findProject(":${name}")
p.name = "itest-${name}"
p.buildFileName = "itest-${name}.gradle"
p.projectDir = new File(settingsDir, "itest/${name}");
}
2013-10-03 22:28:55 -04:00
include 'docs', 'docs:manual', 'docs:guides'
2012-06-29 13:59:22 -04:00
def docs = findProject(':docs')
2010-08-03 21:04:40 -04:00
docs.buildFileName = 'docs.gradle'
2013-12-09 16:51:49 -05:00
include 'bom'
2013-12-09 16:51:49 -05:00
findProject(':bom').name = 'spring-security-bom'
includeSamples("samples" + File.separator + "xml")
includeSamples("samples" + File.separator + "javaconfig")
includeSamples("samples" + File.separator + "boot")
void includeSamples(String samplesDir) {
FileTree tree = fileTree(samplesDir) {
include '**' + File.separator + '*.gradle'
}
tree.each {File file ->
String projectDir = file.path.substring(file.path.indexOf(samplesDir), file.path.lastIndexOf(File.separator))
String projectPath = projectDir.substring(projectDir.lastIndexOf(File.separator) + 1)
String projectNamePrefix = samplesDir.substring(samplesDir.lastIndexOf(File.separator) + 1).toLowerCase();
include projectPath
def project = findProject(":${projectPath}")
project.name = "spring-security-samples-${projectNamePrefix}-${project.name}"
project.projectDir = new File(settingsDir, projectDir)
if (!project.buildFile.exists()) {
project.buildFileName = file.path.substring(file.path.lastIndexOf(File.separator) + 1)
}
}
}