settings.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. pluginManagement {
  2. repositories {
  3. gradlePluginPortal()
  4. maven { url 'https://repo.spring.io/release' }
  5. maven { url 'https://repo.spring.io/milestone' }
  6. }
  7. }
  8. plugins {
  9. id "com.gradle.enterprise" version "3.11.1"
  10. id "io.spring.ge.conventions" version "0.0.11"
  11. }
  12. dependencyResolutionManagement {
  13. repositories {
  14. mavenCentral()
  15. }
  16. }
  17. rootProject.name = "spring-authorization-server"
  18. def buildFiles = fileTree(rootDir) {
  19. def excludes = gradle.startParameter.projectProperties.get("excludeProjects")?.split(",")
  20. include "**/*.gradle", "**/*.gradle.kts"
  21. exclude "build", "**/gradle", "settings.gradle", "buildSrc", "/build.gradle", ".*", "out"
  22. if (excludes) {
  23. exclude excludes
  24. }
  25. }
  26. buildFiles.forEach { buildFile ->
  27. def isDefaultName = buildFile.name == "build.gradle" || buildFile.name == "build.gradle.kts"
  28. def isKotlin = buildFile.name.endsWith ".kts"
  29. if (isDefaultName) {
  30. def buildFilePath = buildFile.parentFile.absolutePath
  31. def projectPath = buildFilePath.replace((String) rootDir.absolutePath, "").replace(File.separator, ":")
  32. include projectPath
  33. } else {
  34. def projectName
  35. if (isKotlin) {
  36. projectName = buildFile.name.replace(".gradle.kts", "")
  37. } else {
  38. projectName = buildFile.name.replace(".gradle", "")
  39. }
  40. def 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. }