settings.gradle 1.5 KB

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