-
Notifications
You must be signed in to change notification settings - Fork 268
/
build.gradle
150 lines (126 loc) · 3.95 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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 "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'arm64-v8a', 'x86'//for emulator
}
}
signingConfigs {
debug {
storeFile new File(project.rootProject.projectDir.absolutePath + "/keystore/debug.jks")
storePassword "qigsawtest"
keyAlias "qigsawtest"
keyPassword "qigsawtest"
}
release {
storeFile new File(project.rootProject.projectDir.absolutePath + "/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
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dynamicFeatures = [':java', ':assets', ':native']
}
def qigsawPath = file("qigsaw/")
qigsawSplit {
/**
* Whether repack base apk with 7z format.
* default value is {@code false}
*/
use7z = false
/**
* optional,default 'null'
* if you want to update split version, oldApk must be set.
*/
oldApk = "${qigsawPath}/app.apk"
/**
* 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
/**
* Whether build multiple APKs for ABIs
*/
multipleApkForABIs = true
/**
* optional, default '1.0.0'
* when update splits, you need upgrade value of splitInfoVersion
*/
splitInfoVersion = '1.0.0'
/**
* optional, default 'null'
*
* restrict split only work in processes which declared in split AndroidManifest file.
*/
restrictWorkProcessesForSplits = ['java']
/**
* Split fragments which would be loaded by activities of base apk.(Not all fragments in split apk)
*/
splitEntryFragments = ['com.iqiyi.qigsaw.sample.java.JavaSampleFragment']
/**
* Activities of base apk which would load split's fragments or resources.
*/
baseContainerActivities = ["com.iqiyi.qigsaw.sample.MainActivity"]
}
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 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.constraintlayout:constraintlayout: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 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}