-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle
94 lines (71 loc) · 2.19 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
def loadProperties = {
Properties properties, String fileName ->
File file = file(fileName)
if (file.exists()) {
properties.load(new FileInputStream(file))
}
}
Properties antProperties = new Properties()
loadProperties(antProperties, "build.properties")
loadProperties(antProperties, "build." + System.properties["user.name"] + ".properties")
loadProperties(antProperties, "build." + System.properties["COMPUTERNAME"] + ".properties")
loadProperties(antProperties, "build." + System.properties["HOST"] + ".properties")
loadProperties(antProperties, "build." + System.properties["HOSTNAME"] + ".properties")
if (!hasProperty("lfrPluginsExcludes")) {
ext.lfrPluginsExcludes = antProperties["plugins.excludes"]
}
if (!hasProperty("lfrPluginsIncludes")) {
ext.lfrPluginsIncludes = antProperties["plugins.includes"]
}
FileTree fileTree = fileTree(rootDir) {
if ((lfrPluginsIncludes != "") && (lfrPluginsIncludes != "*")) {
lfrPluginsIncludes = lfrPluginsIncludes.replaceAll(" ", "")
lfrPluginsIncludes = lfrPluginsIncludes.replaceAll(",+", ",")
def lfrPluginsIncludesArray = lfrPluginsIncludes.split(",")
lfrPluginsIncludesArray = lfrPluginsIncludesArray.collect(
{
"**/" + it + "/build.gradle"
}
)
lfrPluginsIncludesArray.each(
{
include(it)
}
)
}
else {
include("**/build.gradle")
}
if ((lfrPluginsExcludes != "") && (lfrPluginsExcludes != "*")) {
lfrPluginsExcludes = lfrPluginsExcludes.replaceAll(" ", "")
lfrPluginsExcludes = lfrPluginsExcludes.replaceAll(",+", ",")
String[] lfrPluginsExcludesArray = lfrPluginsExcludes.split(",")
lfrPluginsExcludesArray = lfrPluginsExcludesArray.collect(
{
"**/" + it + "/build.gradle"
}
)
lfrPluginsExcludesArray.each(
{
exclude(it)
}
)
}
else {
exclude("**/build.gradle")
}
exclude("build.gradle")
exclude("tools/**/build.gradle")
}
fileTree.each(
{
URI rootURI = rootDir.toURI()
URI pluginURI = it.toURI()
pluginURI = rootURI.relativize(pluginURI)
String pluginDir = pluginURI.toString()
pluginDir = pluginDir.replaceFirst("/build.gradle", "")
include(":" + pluginDir.replaceAll("[\\/]", ":"))
}
)
include(":shared:portal-compat-shared")
gradle.ext.lfrSdkDir = file(".")