settings.gradle 1.4 KB

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