-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflavors_a01.gradle
48 lines (45 loc) · 1.23 KB
/
flavors_a01.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
import jdk.internal.util.xml.impl.Pair
apply plugin: 'com.android.application'
//导出函数
ext.applyFlavorsA01 = { dim ->
this.&applyFlavorsA01(dim)
}
String applyFlavorsA01(String dim) {
//版本信息
def appName = "渠道A01"
def appId = "com.cc.config01"
def version_Name = "1.0.0"
def version_Build = 1
def version_Code = (version_Name.replace(".", "")).toInteger() * 1000 + version_Build
//配置代码差异化配置
android {
//签名配置
signingConfigs {
flavors_a01 {
storeFile file('../jks/a01.jks')
storePassword '123a01'
keyAlias 'a01'
keyPassword '123a01'
}
}
//渠道配置
productFlavors {
//渠道配置
flavors_a01 {
dimension dim
applicationId appId
versionCode version_Code
versionName version_Name
signingConfig signingConfigs.flavors_a01
resValue "string", "app_name", appName
//A01配置
dependencies {
flavors_a01Implementation fileTree(dir: "src/flavors_a01/libs", include: ["*.jar", '*.aar'])
}
}
}
//配置so目录
sourceSets { flavors_a01 { jniLibs.srcDirs = ['src/flavors_a01/jniLibs'] } }
}
return "flavors_a01,${appName}"
}