-
Notifications
You must be signed in to change notification settings - Fork 6
/
settings.gradle
47 lines (40 loc) · 1.27 KB
/
settings.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pluginManagement {
repositories {
gradlePluginPortal()
}
}
plugins {
id "com.gradle.enterprise" version "3.15.1"
id "io.spring.ge.conventions" version "0.0.14"
}
rootProject.name = "spring-security-release-tools"
def buildFiles = fileTree(rootDir) {
def excludes = gradle.startParameter.projectProperties.get("excludeProjects")?.split(",")
include "**/*.gradle", "**/*.gradle.kts"
exclude "build", "**/gradle", "settings.gradle", "buildSrc", "/build.gradle", ".*", "out"
if (excludes) {
exclude excludes
}
}
buildFiles.forEach { buildFile ->
def isDefaultName = buildFile.name == "build.gradle" || buildFile.name == "build.gradle.kts"
def isKotlin = buildFile.name.endsWith ".kts"
if (isDefaultName) {
def buildFilePath = buildFile.parentFile.absolutePath
def projectPath = buildFilePath.replace((String) rootDir.absolutePath, "").replace(File.separator, ":")
include projectPath
} else {
def projectName
if (isKotlin) {
projectName = buildFile.name.replace(".gradle.kts", "")
} else {
projectName = buildFile.name.replace(".gradle", "")
}
def projectPath = ":$projectName"
include projectPath
def project = findProject(projectPath)
project.name = projectName
project.projectDir = buildFile.parentFile
project.buildFileName = buildFile.name
}
}