settings.gradle 1.3 KB

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