settings.gradle 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. rootProject.name = 'spring-security'
  2. rootProject.children.each {project ->
  3. //assert project.projectDir.isDirectory()
  4. //assert project.buildFile.isFile()
  5. }
  6. def String[] modules = [
  7. 'core',
  8. 'data',
  9. 'remoting',
  10. 'web',
  11. 'ldap',
  12. 'acl',
  13. 'config',
  14. 'cas',
  15. 'openid',
  16. 'taglibs',
  17. 'aspects',
  18. 'crypto',
  19. 'messaging',
  20. 'test'
  21. ]
  22. include modules
  23. modules.each {name ->
  24. def p = findProject(":${name}")
  25. p.name = "spring-security-${name}"
  26. p.buildFileName = "${name}.gradle"
  27. }
  28. def String[] itest = [
  29. 'web',
  30. 'context'
  31. ]
  32. include itest
  33. itest.each { name ->
  34. def p = findProject(":${name}")
  35. p.name = "itest-${name}"
  36. p.buildFileName = "itest-${name}.gradle"
  37. p.projectDir = new File(settingsDir, "itest/${name}");
  38. }
  39. include 'docs', 'docs:manual', 'docs:guides'
  40. def docs = findProject(':docs')
  41. docs.buildFileName = 'docs.gradle'
  42. include 'bom'
  43. findProject(':bom').name = 'spring-security-bom'
  44. includeSamples("samples" + File.separator + "xml")
  45. includeSamples("samples" + File.separator + "javaconfig")
  46. includeSamples("samples" + File.separator + "boot")
  47. void includeSamples(String samplesDir) {
  48. FileTree tree = fileTree(samplesDir) {
  49. include '**' + File.separator + '*.gradle'
  50. }
  51. tree.each {File file ->
  52. String projectDir = file.path.substring(file.path.indexOf(samplesDir), file.path.lastIndexOf(File.separator))
  53. String projectPath = projectDir.substring(projectDir.lastIndexOf(File.separator) + 1)
  54. String projectNamePrefix = samplesDir.substring(samplesDir.lastIndexOf(File.separator) + 1).toLowerCase();
  55. include projectPath
  56. def project = findProject(":${projectPath}")
  57. project.name = "spring-security-samples-${projectNamePrefix}-${project.name}"
  58. project.projectDir = new File(settingsDir, projectDir)
  59. if (!project.buildFile.exists()) {
  60. project.buildFileName = file.path.substring(file.path.lastIndexOf(File.separator) + 1)
  61. }
  62. }
  63. }