-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
62 lines (56 loc) · 1.69 KB
/
build.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
apply plugin: 'com.android.library'
apply plugin: 'io.github.tubb.multichannel'
android {
compileSdkVersion project.ext.compileSdkVersion
defaultConfig {
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion
versionCode project.ext.versionCode
versionName project.ext.versionName
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
project.android.flavorDimensions("default")
productFlavors {
dev {
dimension 'default'
manifestPlaceholders = [ channel:"dev" ]
}
}
}
appChannel {
channelFlavorConfig {
channelConfigFilePath "${project.getProjectDir()}/channels.txt"
configProductFlavor { name ->
if ('qq'.equals(name)) {
return {
dimension 'default'
manifestPlaceholders = [ channel:"${name}_yyb" ]
}
} else {
return {
dimension 'default'
manifestPlaceholders = [ channel:name ]
}
}
}
// must call after configProductFlavor dsl
createChannel()
}
bundleOutputConfig {
outputDir "${project.getProjectDir()}/channels"
renameBundleFile { project, variant ->
project.name + '-' + variant.flavorName + '-' + variant.buildType.name +'-'+ project.ext.versionName +'.aar'
}
}
taskConfig {
disableLintTask true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}