-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
372 lines (317 loc) · 13.7 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
apply plugin: 'com.android.application'
//apply plugin: 'com.google.protobuf'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'checkstyle'
checkstyle {
showViolations true
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.stratagile.qwallet"
minSdkVersion 23
targetSdkVersion 29
versionCode getSelfDefinedVersion("code") + 51
multiDexEnabled true
versionName "2.9.6"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
}
manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "0b552b82816c33ceda8a8d16", //JPush 上注册的包名对应的 Appkey.
// JPUSH_APPKEY : "75f163203819cc97f4ba16b8", //测试
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
]
}
// 取消掉系统对.9图片的检查
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
packagingOptions {
pickFirst 'en-mnemonic-word-list.txt'
}
signingConfigs{
debug {
def properties = new Properties()
def inputStream = project.rootProject.file('local.properties').newDataInputStream()
properties.load( inputStream )
storeFile file(rootProject.getRootDir().getAbsolutePath() + "/app/qlink.jks");
storePassword properties.getProperty('DEBUG_KEYSTORE_PASSWORD')
keyAlias properties.getProperty('DEBUG_KEY_ALIAS')
keyPassword properties.getProperty('DEBUG_KEY_PASSWORD')
}
release{
def properties = new Properties()
def inputStream = project.rootProject.file('local.properties').newDataInputStream()
properties.load( inputStream )
storeFile file(rootProject.getRootDir().getAbsolutePath()+"/app/qlink.jks");
storePassword properties.getProperty('RELEASE_KEYSTORE_PASSWORD')
keyAlias properties.getProperty('RELEASE_KEY_ALIAS')
keyPassword properties.getProperty('RELEASE_KEY_PASSWORD')
}
}
buildTypes {
debug {
minifyEnabled false
buildConfigField "boolean", "LOG_DEBUG", "true"
signingConfig signingConfigs.debug
jniDebuggable true
}
release {
minifyEnabled false
signingConfig signingConfigs.release
buildConfigField "boolean", "LOG_DEBUG", "false"
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
dexOptions {
javaMaxHeapSize "4g"
}
aaptOptions {
cruncherEnabled = false
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v13'
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
normal {
}
googleplay {
}
}
greendao {
schemaVersion 87//数据库版本号
daoPackage 'com.stratagile.qlink.db'//设置DaoMaster、DaoSession、Dao包名
targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录
//targetGenDirTest:设置生成单元测试目录
//generateTests:设置自动生成单元测试用例
}
flavorDimensions "implementation"
productFlavors {
normal {
dimension "implementation"
buildConfigField 'boolean', 'isGooglePlay', 'false'
}
googleplay {
dimension "implementation"
buildConfigField 'boolean', 'isGooglePlay', 'true'
}
}
buildToolsVersion '28.0.3'
}
repositories {
mavenCentral()
flatDir {
dirs 'libs' //就是你放aar的目录地址
}
}
// Ensure native build is run before assets, so assets are ready to be merged into the apk
android.applicationVariants.all { variant ->
variant.mergeAssets.dependsOn(variant.externalNativeBuildTasks)
}
android.applicationVariants.all { variant ->
// variant.productFlavors.each {
// if (it.dimension == 'implementation' && it.name != 'noovpn3')
// variant.getJavaCompiler().dependsOn(generateOpenVPN3Swig)
//
// }
}
dependencies {
normalImplementation project(':smsLib')
implementation 'com.google.firebase:firebase-analytics:16.0.9'
implementation 'com.google.firebase:firebase-core:16.0.9'
configurations {
all*.exclude group: 'com.android.support', module: 'support-v13'
all*.exclude group: 'com.google.zxing'
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:support-dynamic-animation:28.0.0"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation "com.android.support:design:$supportVersion"
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
implementation "com.android.support:cardview-v7:$supportVersion"
implementation 'com.android.support:multidex:1.0.3'
// Net
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
// implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
// Annotation
implementation 'com.google.dagger:dagger:2.16'
kapt 'com.google.dagger:dagger-compiler:2.16'
compileOnly 'org.glassfish:javax.annotation:10.0-b28'
// Rx
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
// Bus
implementation 'org.greenrobot:eventbus:3.1.1'
// implementation 'com.github.zhaokaiqiang.klog:library:1.6.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.40'
//图片加载框架
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'
//butterknife
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
kapt 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
implementation 'com.yanzhenjie:permission:1.1.2'
// implementation files('libs/org.apache.http.legacy.jar')
// implementation files('libs/commons-codec-1.9.jar')
// implementation files('libs/json-lib-2.4-jdk15.jar')
implementation files('libs/wowoviewpager.aar')
implementation 'com.alibaba:fastjson:1.2.37'
implementation 'org.greenrobot:greendao:3.2.2'
// implementation 'com.lzy.widget:view-core:0.1.5'
implementation 'com.tencent.bugly:crashreport:2.6.6.1'
implementation 'com.tencent.bugly:nativecrashreport:3.3.1'
implementation project(':RxTools-library')
implementation project(':library')
implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar'
implementation 'com.kyleduo.switchbutton:library:2.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
/* implementation 'com.google.android.gms:play-services-maps:15.0.0'*/
implementation 'cc.solart:turbo-recyclerview-helper:1.0.3-beta'
implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.0.2'
//谷歌的kotlin扩展库
// implementation 'androidx.core:core-ktx:0.3'
implementation project(':neoutils')
implementation project(':autosize')
// implementation project(':libsodium-jni-release')
implementation 'com.github.kotlin-graphics:kotlin-unsigned:v2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.salomonbrys.kotson:kotson:2.5.0'
// implementation 'org.web3j:core:3.3.1-android'
implementation 'org.web3j:core:4.6.0-android'
// implementation('com.facebook.android:facebook-android-sdk:[4,5)') {
// exclude group: 'com.google.zxing'
// exclude group: 'com.android.support'
// }
implementation "android.arch.lifecycle:runtime:$arch_version"
implementation "android.arch.lifecycle:common-java8:$arch_version"
kapt "android.arch.lifecycle:compiler:$arch_version"
implementation "android.arch.lifecycle:extensions:$arch_version"
// shadowsocks vpn
// implementation project(':core')
implementation files('libs/core-release.aar')
implementation 'android.arch.persistence.room:runtime:1.1.1'
kapt "android.arch.persistence.room:compiler:1.1.1"
implementation "android.arch.work:work-runtime-ktx:$workVersion"
implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.4'
implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214'
implementation 'net.glxn.qrgen:android:2.0'
implementation('xyz.belvi.mobilevision:barcodescanner:2.0.3') {
exclude group: 'com.android.support'
}
androidTestImplementation "android.arch.work:work-testing:$workVersion"
implementation 'com.jakewharton.timber:timber:4.7.0'
implementation 'com.pawegio.kandroid:kandroid:0.8.7@aar'
implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.2.6'
implementation 'org.bitcoinj:bitcoinj-core:0.15.2'
implementation 'com.google.android:flexbox:0.3.2'
implementation files('libs/commons-collections-3.2.2.jar')
implementation files('libs/commons-codec-1.9.jar')
// implementation files('libs/blake2b-1.0.0.jar')
// implementation files('libs/commons-httpclient-3.0.1.jar')
// implementation files('libs/eddsa-0.3.0.jar')
// implementation files('libs/qlc-java-sdk-1.0.0.jar')
implementation files('libs/libsodium-jni-release.aar')
implementation 'com.github.kittinunf.fuel:fuel:1.13.0'
// implementation 'com.github.consenlabs:token-core-android:v0.1'
// implementation project(':MPChartLib')
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation files('libs/BASE64Encoder.jar')
//imtoken
// implementation 'com.github.consenlabs:token-core-android:v0.1'
implementation 'com.jaeger.statusbarutil:library:1.5.1'
implementation 'com.squareup.retrofit2:converter-jackson:2.5.0'
implementation 'com.github.hackware1993:MagicIndicator:1.5.0'
//implementation 'com.github.qlcchain:qlc-java-sdk:2.4'
// implementation 'com.github.huzhipeng111:qlc-java-sdk:1.8'
// implementation 'com.qmuiteam:qmui:1.2.0'
// implementation 'com.qmuiteam:arch:0.3.1'
implementation files('libs/klogLibrary-release.aar')
// implementation 'info.hoang8f:android-segmented:1.0.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0-eap13'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.27.0-eap13'
implementation 'com.google.guava:guava:28.2-android'
// implementation 'cn.jiguang.sdk:jpush:3.3.6' // 此处以JPush 3.3.6 版本为例。
// implementation 'cn.jiguang.sdk:jcore:2.1.6' // 此处以JCore 2.1.6 版本为例。
implementation files('libs/jcore-android-2.3.8-google_play.jar')
implementation files('libs/jpush-android-3.6.6-google_play.jar')
implementation files('libs/binance-dex-api-client.jar')
implementation 'com.android.support:support-dynamic-animation:28.0.0'
implementation 'com.rfksystems:blake2b:1.0.0'
implementation 'net.i2p.crypto:eddsa:0.3.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.7'
implementation project(':lib-todaystepcounter')
implementation ('io.neow3j:contract:2.+')
implementation 'com.trustwallet.walletcore:walletcore:0.12.8'
// implementation files('libs/lib-todaystepcounter-release.aar')
// implementation 'io.grpc:grpc-okhttp:1.31.1'
// implementation 'io.grpc:grpc-protobuf-lite:1.31.1'
// implementation 'io.grpc:grpc-stub:1.31.1'
// compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
}
//protobuf {
// protoc { artifact = 'com.google.protobuf:protoc:3.12.0' }
// plugins {
// grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.31.1' // CURRENT_GRPC_VERSION
// }
// }
// generateProtoTasks {
// all().each { task ->
// task.builtins {
// java { option 'lite' }
// }
// task.plugins {
// grpc { // Options added to --grpc_out
// option 'lite' }
// }
// }
// }
//}
def getSelfDefinedVersion(type) {
int aa = 1
int bb = 0
Process process = "git rev-list --count HEAD".execute()
process.waitFor()
int cccc = process.getText().toInteger()
if ("code".equals(type)) {
cccc
} else if ("name".equals(type)) {
String today = new Date().format("yyMMdd")
process = "git describe --always".execute()
process.waitFor()
String sha1 = process.getText().trim()
"$aa.$bb.$cccc.$today.$sha1"
}
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'