settings.gradle 1.5 KB

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