-
Notifications
You must be signed in to change notification settings - Fork 43
/
channel.gradle
71 lines (66 loc) · 2.09 KB
/
channel.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
android {
// 多渠道打包配置
flavorDimensions += 'version'
productFlavors {
huawei {
dimension = 'version'
applicationIdSuffix = '.huawei'
versionNameSuffix = '-huawei'
versionCode = 1
buildConfigField 'int', 'CHANNEL_CODE', '1001'
}
oppo {
dimension = 'version'
applicationIdSuffix = '.oppo'
versionNameSuffix = '-oppo'
versionCode = 1
buildConfigField 'int', 'CHANNEL_CODE', '1002'
}
// fast {
// dimension = 'version'
// applicationIdSuffix = '.fast'
// versionNameSuffix = '-fast'
// versionCode = 1
// buildConfigField 'int', 'CHANNEL_CODE', '1003'
// manifestPlaceholders = [
// app_icon: '@mipmap/ic_launcher',
// app_name: '@string/app_name' + '极速版',
// ]
// }
}
// 资源文件路径
sourceSets {
oppo {
java.srcDirs 'src/oppo/java', 'src/huawei/java'
kotlin.srcDirs 'src/huawei/kotlin'
aidl.srcDirs 'src/huawei/aidl'
res.srcDirs 'src/huawei/res'
assets.srcDirs 'src/huawei/assets'
jniLibs.srcDirs 'src/huawei/jniLibs'
renderscript.srcDirs 'src/huawei/rs'
manifest.srcFile 'src/huawei/AndroidManifest.xml'
}
}
// // 多渠道方式 实现ABI分包 参考
// flavorDimensions += listOf("version")
// productFlavors {
// create("huawei-armeabi-v7a") {
// dimension = "version"
// ndk {
// abiFilters.addAll(mutableSetOf("armeabi-v7a"))
// }
// }
// create("huawei-arm64-v8a") {
// dimension = "version"
// ndk {
// abiFilters.addAll(mutableSetOf("arm64-v8a"))
// }
// }
// create("huawei-all") {
// dimension = "version"
// ndk {
// abiFilters.addAll(mutableSetOf("arm64-v8a", "armeabi-v7a"))
// }
// }
// }
}