forked from iqiyi/Qigsaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (102 loc) · 3.16 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
apply plugin: 'com.android.application'
if (sample) {
apply plugin: 'com.iqiyi.qigsaw.sample.application'
} else {
apply plugin: 'com.iqiyi.qigsaw.application'
}
android {
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.iqiyi.qigsaw.sample"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
multiDexEnabled true
multiDexKeepProguard file('multidexkeep.pro')
versionCode 271
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file("./keystore/debug.jks")
storePassword "qigsawtest"
keyAlias "qigsawtest"
keyPassword "qigsawtest"
}
release {
storeFile file("./keystore/release.jks")
storePassword "qigsawtest"
keyAlias "qigsawtest"
keyPassword "qigsawtest"
}
}
buildTypes {
release {
minifyEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
signingConfig signingConfigs.debug
}
}
dynamicFeatures = [':java', ':assets', ":native"]
}
def qigsawPath = file("qigsaw/")
qigsawSplit {
/**
* optional,default 'null'
* if you want to update split version, oldApk must be set.
*/
oldApk = "${qigsawPath}/app.apk"
/**
* optional, default 'null'
*
* restrict split only work in processes which declared in split AndroidManifest file.
*/
restrictWorkProcessesForSplits = ['java']
/**
* optional, default '1.0.0'
* when update splits, you need upgrade value of splitInfoVersion
*/
splitInfoVersion = '1.0.0'
/**
* optional,default 'null'
* if you want to update splits, applyMapping must be set.
*/
applyMapping = "${qigsawPath}/mapping.txt"
/**
* optional, default 'false'
* Whether upload all split APKs to CDN, ignored 'onDemand' declared in split AndroidManifest file.
*/
releaseSplitApk = false
}
if (sample) {
splitUpload {
/**
* Whether upload all split apks to test env
*/
useTestEnv = true
/**
* You can decide which split apks should be upload to test env.
*/
testOnly = ["java"]
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api "com.android.support:appcompat-v7:${versions.support}"
implementation "com.android.support:multidex:1.0.3"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
if (sample) {
api "com.iqiyi.android.qigsaw:splitcore:${VERSION_NAME}"
} else {
api project(':splitcore')
}
implementation project(':downloader')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}