-
Notifications
You must be signed in to change notification settings - Fork 0
/
flavors_a00.gradle
51 lines (48 loc) · 1.5 KB
/
flavors_a00.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
apply plugin: 'com.android.application'
//导出函数
ext.applyFlavorsA00 = { dim ->
this.&applyFlavorsA00(dim)
}
//解决渠道下DebugImplementation和ReleaseImplementation编译通不过的问题 https://stackoverflow.com/questions/24860659/multi-flavor-app-based-on-multi-flavor-library-in-android-gradle
configurations {
flavors_a00DebugImplementation
}
String applyFlavorsA00(String dim) {
//版本信息
def appName = "原始版"
def appId = "com.cc.config00"
def version_Name = "1.0.0"
def version_Build = 0
def version_Code = (version_Name.replace(".", "")).toInteger() * 1000 + version_Build
//配置代码差异化配置
android {
//签名配置
signingConfigs {
flavors_a00 {
storeFile file('../jks/a00.jks')
storePassword '123a00'
keyAlias 'a00'
keyPassword '123a00'
}
}
//渠道配置
productFlavors {
flavors_a00 {
dimension dim
applicationId appId
versionCode version_Code
versionName version_Name
signingConfig signingConfigs.flavors_a00
resValue "string", "app_name", appName
//A00配置
dependencies {
flavors_a00DebugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
flavors_a00Implementation fileTree(dir: "src/flavors_a00/libs", include: ["*.jar", '*.aar'])
}
}
}
//配置so目录
sourceSets { flavors_a00 { jniLibs.srcDirs = ['src/flavors_a00/jniLibs'] } }
}
return "flavors_a00,${appName}"
}