settings.gradle 1.5 KB

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