settings.gradle 1.3 KB

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