settings.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.2"
  9. id "io.spring.ge.conventions" version "0.0.6"
  10. }
  11. enableFeaturePreview("VERSION_ORDERING_V2")
  12. rootProject.name = 'spring-security'
  13. FileTree buildFiles = fileTree(rootDir) {
  14. List excludes = gradle.startParameter.projectProperties.get("excludeProjects")?.split(",")
  15. include '**/*.gradle', '**/*.gradle.kts'
  16. exclude 'build', '**/gradle', 'settings.gradle', 'buildSrc', '/build.gradle', '.*', 'out'
  17. exclude '**/grails3'
  18. if(excludes) {
  19. exclude excludes
  20. }
  21. }
  22. String rootDirPath = rootDir.absolutePath + File.separator
  23. buildFiles.each { File buildFile ->
  24. boolean isDefaultName = 'build.gradle'.equals(buildFile.name)
  25. boolean isKotlin = buildFile.name.endsWith(".kts")
  26. if(isDefaultName) {
  27. String buildFilePath = buildFile.parentFile.absolutePath
  28. String projectPath = buildFilePath.replace(rootDirPath, '').replace(File.separator, ':')
  29. include projectPath
  30. } else {
  31. String projectName
  32. if (isKotlin) {
  33. projectName = buildFile.name.replace('.gradle.kts', '')
  34. } else {
  35. projectName = buildFile.name.replace('.gradle', '')
  36. }
  37. String projectPath = ':' + projectName;
  38. include projectPath
  39. def project = findProject("${projectPath}")
  40. project.name = projectName
  41. project.projectDir = buildFile.parentFile
  42. project.buildFileName = buildFile.name
  43. }
  44. }