settings.gradle 1.4 KB

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