build.gradle
3.42 KB
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
apply plugin: 'com.android.library'
apply plugin: 'com.alipay.apollo.baseline.config'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
javaCompileOptions {
annotationProcessorOptions {
arguments = [
rxhttp_package: 'rxhttp', //非必须,指定RxHttp类包名
//传入你依赖的rxjava版本,可传入rxjava2、rxjava3,依赖RxJava时必须
rxhttp_rxjava: 'rxjava2'
]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility = 1.8
sourceCompatibility = 1.8
}
}
dependencies {
implementation platform("com.mpaas.android:$mpaas_artifact:$mpaas_baseline")
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.mpaas.android:logging'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// //RxHttp网络请求框架依赖
// implementation 'com.rxjava.rxhttp:rxhttp:1.4.2'
// annotationProcessor 'com.rxjava.rxhttp:rxhttp-compiler:1.4.1'
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// implementation 'com.rxjava.rxlife:rxlife:1.1.0'
// implementation 'com.blankj:utilcode:1.30.6'
// api project(path: ':CommonRes')
implementation 'com.github.liujingxing.rxhttp:rxhttp:2.6.1'
annotationProcessor 'com.github.liujingxing.rxhttp:rxhttp-compiler:2.6.1'
implementation("com.squareup.okhttp3:okhttp:4.9.0")
//rxjava2 (RxJava2/Rxjava3二选一,使用asXxx方法时必须)
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.github.liujingxing.rxlife:rxlife-rxjava2:2.1.0' //管理RxJava2生命周期,页面销毁,关闭请求
implementation 'com.blankj:utilcode:1.30.6'
api project(path: ':CommonRes')
// implementation 'com.squareup.okhttp3:okhttp:4.10.0'
// implementation 'com.github.liujingxing.rxhttp:rxhttp:3.2.3'
// annotationProcessor 'com.github.liujingxing.rxhttp:rxhttp-compiler:3.2.3'
// //RxJava2
// implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// implementation 'com.github.liujingxing.rxlife:rxlife-rxjava2:2.2.2' //管理RxJava2生命周期,页面销毁,关闭请求
// //以下三个为必须,其它均为非必须
// implementation 'com.ljx.rxhttp:rxhttp:2.2.2'
// implementation 'com.squareup.okhttp3:okhttp:4.10.0' //rxhttp v2.2.2版本起,需要手动依赖okhttp
// annotationProcessor 'com.ljx.rxhttp:rxhttp-compiler:2.2.2' //生成RxHttp类,kotlin用户,请使用kapt替代annotationProcessor
// implementation 'com.ljx.rxlife2:rxlife-rxjava:2.0.0' //管理RxJava2生命周期,页面销毁,关闭请求
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
}