-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings.gradle
44 lines (39 loc) · 1.15 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
include ':app', ':service'
if (isModuleDebug()) {
def modules = readModules()
modules.each {
include(":$it")
}
} else {
include ':m-sign', ':m-applet', ':m-debug', ':m-widget', ':m-source', ':m-other', ':m-rn', ':m-webview', ':m-qrcode', ':m-im', ':m-entrance', ':m-monitor', ':m-flutter'
}
def isModuleDebug() {
Properties properties = new Properties()
def file = new File("local.properties")
if (file.exists()) {
InputStream inputStream = file.newDataInputStream()
properties.load(inputStream)
def str = properties.getProperty('MODULE_DEBUG')
if (str == null) {
return false
} else {
return Boolean.parseBoolean(str)
}
}
return false
}
def readModules() {
Properties properties = new Properties()
def file = new File("local.properties")
if (file.exists()) {
InputStream inputStream = file.newDataInputStream()
properties.load(inputStream)
def str = properties.getProperty('MODULES')
if (str == null) {
return []
} else {
return str.split(",")
}
}
return []
}