settings.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. pluginManagement {
  2. repositories {
  3. gradlePluginPortal()
  4. }
  5. }
  6. plugins {
  7. id "io.spring.develocity.conventions" version "0.0.24"
  8. }
  9. dependencyResolutionManagement {
  10. repositories {
  11. mavenCentral()
  12. maven { url "https://repo.spring.io/milestone" }
  13. }
  14. }
  15. rootProject.name = 'spring-security'
  16. FileTree buildFiles = fileTree(rootDir) {
  17. List excludes = gradle.startParameter.projectProperties.get("excludeProjects")?.split(",")
  18. include '**/*.gradle', '**/*.gradle.kts'
  19. exclude 'build', '**/gradle', 'settings.gradle', 'buildSrc', '/build.gradle', '.*', 'out'
  20. exclude '**/grails3'
  21. if(excludes) {
  22. exclude excludes
  23. }
  24. }
  25. String rootDirPath = rootDir.absolutePath + File.separator
  26. buildFiles.each { File buildFile ->
  27. boolean isDefaultName = 'build.gradle'.equals(buildFile.name)
  28. boolean isKotlin = buildFile.name.endsWith(".kts")
  29. if(isDefaultName) {
  30. String buildFilePath = buildFile.parentFile.absolutePath
  31. String projectPath = buildFilePath.replace(rootDirPath, '').replace(File.separator, ':')
  32. include projectPath
  33. } else {
  34. String projectName
  35. if (isKotlin) {
  36. projectName = buildFile.name.replace('.gradle.kts', '')
  37. } else {
  38. projectName = buildFile.name.replace('.gradle', '')
  39. }
  40. String projectPath = ':' + projectName;
  41. include projectPath
  42. def project = findProject("${projectPath}")
  43. project.name = projectName
  44. project.projectDir = buildFile.parentFile
  45. project.buildFileName = buildFile.name
  46. }
  47. }