-
Notifications
You must be signed in to change notification settings - Fork 4
/
publish_config.gradle
53 lines (48 loc) · 1.68 KB
/
publish_config.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
ext {
defaultVariantIndex = 2
// 测试,预生产,线上
variants = ['BXNT_101_NATION', 'BXNY_101_NATION', 'BXN_101_NATION']
apps = [/*'app',*/ /*'appjiuzhidao',*/ 'appphone']
variantMapping = { variant ->
def arr = variant.split "_"
"${arr[0]}_${arr[2]}"
}
apkNameMapping = { variant ->
def versionCode = rootProject.ext.versionCode
def versionNameSuffix = rootProject.ext.versionNameSuffix
def versionNamePrefix = ""
switch (variant) {
case variants[0]:
versionNamePrefix = rootProject.ext.versionNamePrefixT
break
case variants[1]:
versionNamePrefix = rootProject.ext.versionNamePrefixY
break
case variants[2]:
versionNamePrefix = rootProject.ext.versionNamePrefixO
break
}
return versionNamePrefix + versionCode + versionNameSuffix
}
apkNameMappingNew = { appName, variant ->
def versionNamePrefix = ""
switch (variant) {
case variants[0]:
versionNamePrefix = rootProject.ext.versionNamePrefixT
break
case variants[1]:
versionNamePrefix = rootProject.ext.versionNamePrefixY
break
case variants[2]:
versionNamePrefix = rootProject.ext.versionNamePrefixO
break
}
result = appName + versionNamePrefix + rootProject.ext.appNameSuffix
result.toUpperCase()
// if (rootProject.ext.IS_FOR_UM) {
// result.toLowerCase()
// } else {
// result.toUpperCase()
// }
}
}