|
1 | 1 | plugins {
|
2 |
| - id 'com.android.application' |
3 |
| - id 'kotlin-android' |
| 2 | + alias(libs.plugins.android.application) |
| 3 | + alias(libs.plugins.kotlin.android) |
4 | 4 | id 'kotlin-kapt'
|
5 |
| -// id 'dagger.hilt.android.plugin' |
6 |
| - id 'com.google.devtools.ksp' version "$ksp_version" |
7 |
| - // id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.10' |
| 5 | + id 'com.google.devtools.ksp' version libs.versions.ksp |
8 | 6 | }
|
9 | 7 |
|
10 | 8 | android {
|
11 | 9 |
|
12 | 10 | namespace 'com.example.httpsender'
|
13 | 11 |
|
14 |
| - compileSdk 34 |
| 12 | + compileSdk 35 |
15 | 13 | defaultConfig {
|
16 | 14 | applicationId "com.example.rxhttp"
|
17 | 15 | minSdk 21
|
18 |
| - targetSdk 34 |
| 16 | + targetSdk 35 |
19 | 17 | versionCode 1
|
20 | 18 | versionName "1.0"
|
21 | 19 |
|
@@ -51,76 +49,67 @@ android {
|
51 | 49 | }
|
52 | 50 |
|
53 | 51 | ksp {
|
54 |
| - arg("rxhttp_rxjava", rxjava_version) |
| 52 | + arg("rxhttp_rxjava", libs.versions.rxjava.get()) |
55 | 53 | // arg("rxhttp_package", "rxhttp")
|
56 | 54 | }
|
57 | 55 |
|
58 | 56 | kapt {
|
59 | 57 | arguments {
|
60 |
| - arg("rxhttp_rxjava", rxjava_version) //可传入rxjava2、rxjava3或具体版本号,如 3.1.1 |
| 58 | + arg("rxhttp_rxjava", libs.versions.rxjava.get()) //可传入rxjava2、rxjava3或具体版本号,如 3.1.1 |
61 | 59 | // arg("rxhttp_package", "rxhttp") //设置RxHttp相关类的包名,多module依赖时,需要配置不同的包名
|
62 | 60 | }
|
63 | 61 | }
|
64 | 62 |
|
65 | 63 |
|
66 |
| -//configurations.all { |
67 |
| -// resolutionStrategy.cacheChangingModulesFor 0, 'seconds' |
68 |
| -//} |
69 |
| - |
70 | 64 | dependencies {
|
71 |
| - implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') |
72 |
| - implementation 'androidx.multidex:multidex:2.0.1' |
73 |
| - implementation 'androidx.appcompat:appcompat:1.7.0' |
74 |
| - implementation 'androidx.recyclerview:recyclerview:1.3.2' |
75 |
| - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' |
76 |
| - implementation 'com.github.hackware1993:MagicIndicator:1.7.0' |
77 |
| - implementation "androidx.fragment:fragment-ktx:1.6.2" |
78 |
| - implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" |
79 |
| - implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" |
80 |
| - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" |
81 |
| - implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version" |
82 |
| - |
83 |
| - implementation project(":rxhttp") |
84 |
| - ksp project(':rxhttp-compiler') |
85 |
| -// kapt project(':rxhttp-compiler') |
86 |
| -// implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version" |
87 |
| - |
88 |
| - implementation "com.squareup.okhttp3:okhttp:$okhttp_version" |
89 |
| - testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version" |
90 |
| - |
91 |
| -// implementation "com.github.liujingxing.rxhttp:rxhttp:$rxhttp_version" |
92 |
| -// ksp "com.github.liujingxing.rxhttp:rxhttp-compiler:$rxhttp_version" |
93 |
| -// kapt "com.github.liujingxing.rxhttp:rxhttp-compiler:$rxhttp_version" |
| 65 | + implementation libs.androidx.multidex |
| 66 | + implementation libs.androidx.appcompat |
| 67 | + implementation libs.androidx.recyclerview |
| 68 | + implementation libs.androidx.constraintlayout |
| 69 | + implementation libs.github.magicindicator |
| 70 | + implementation libs.androidx.fragment.ktx |
| 71 | + implementation libs.androidx.lifecycle.runtime.ktx |
| 72 | + implementation libs.androidx.lifecycle.livedata.ktx |
| 73 | + implementation libs.androidx.lifecycle.viewmodel.ktx |
| 74 | + implementation libs.androidx.lifecycle.service |
| 75 | + |
| 76 | + implementation projects.rxhttp |
| 77 | + ksp projects.rxhttpCompiler |
| 78 | +// kapt projects.rxhttpCompiler |
| 79 | + |
| 80 | + implementation libs.okhttp |
| 81 | + testImplementation libs.mockwebserver |
| 82 | + |
| 83 | +// implementation libs.rxhttp |
| 84 | +// ksp libs.rxhttp.compiler |
| 85 | +// kapt libs.rxhttp.compiler |
94 | 86 |
|
95 | 87 | //管理RxJava及生命周期,Activity/Fragment 销毁,自动关闭未完成的请求
|
96 |
| - implementation "com.github.liujingxing.rxlife:rxlife-rxjava3:$rxlife_version" |
97 |
| - implementation 'io.reactivex.rxjava3:rxandroid:3.0.2' |
98 |
| - implementation "io.reactivex.rxjava3:rxjava:$rxjava_version" |
99 |
| - |
100 |
| -// implementation "com.github.liujingxing.rxhttp:converter-serialization:$rxhttp_version" |
101 |
| -// implementation "com.github.liujingxing.rxhttp:converter-fastjson:$rxhttp_version" |
102 |
| -// implementation "com.github.liujingxing.rxhttp:converter-jackson:$rxhttp_version" |
103 |
| -// implementation "com.github.liujingxing.rxhttp:converter-moshi:$rxhttp_version" |
104 |
| -// implementation "com.github.liujingxing.rxhttp:converter-protobuf:$rxhttp_version" |
105 |
| -// implementation "com.github.liujingxing.rxhttp:converter-simplexml:$rxhttp_version" |
106 |
| - |
107 |
| - implementation project(':rxhttp-converter:converter-serialization') |
108 |
| - implementation project(':rxhttp-converter:converter-fastjson') |
109 |
| - implementation project(':rxhttp-converter:converter-simplexml') |
110 |
| - implementation project(':rxhttp-converter:converter-protobuf') |
111 |
| - implementation project(':rxhttp-converter:converter-moshi') |
112 |
| - implementation project(':rxhttp-converter:converter-jackson') |
113 |
| - |
114 |
| - testImplementation 'junit:junit:4.13.2' |
115 |
| - androidTestImplementation 'androidx.test.ext:junit:1.1.5' |
116 |
| - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' |
117 |
| - implementation 'com.blankj:utilcodex:1.31.1' |
118 |
| - |
119 |
| - testImplementation "com.github.tschuchortdev:kotlin-compile-testing-ksp:1.6.0" |
120 |
| - testImplementation 'com.squareup:kotlinpoet:1.18.1' |
121 |
| - testImplementation 'com.squareup:kotlinpoet-ksp:1.18.1' |
122 |
| - testImplementation project(':rxhttp-compiler') |
123 |
| - |
124 |
| -// implementation "com.google.dagger:hilt-android:2.48.1" |
125 |
| -// ksp "com.google.dagger:hilt-android-compiler:2.48.1" |
| 88 | + implementation libs.github.rxlife.rxjava3 |
| 89 | + implementation libs.rxandroid |
| 90 | + implementation libs.rxjava |
| 91 | + |
| 92 | +// implementation libs.rxhttp.converter.serialization |
| 93 | +// implementation libs.rxhttp.converter.fastjson |
| 94 | +// implementation libs.rxhttp.converter.jackson |
| 95 | +// implementation libs.rxhttp.converter.moshi |
| 96 | +// implementation libs.rxhttp.converter.protobuf |
| 97 | +// implementation libs.rxhttp.converter.simplexml |
| 98 | + |
| 99 | + implementation projects.rxhttpConverter.converterSerialization |
| 100 | + implementation projects.rxhttpConverter.converterFastjson |
| 101 | + implementation projects.rxhttpConverter.converterSimplexml |
| 102 | + implementation projects.rxhttpConverter.converterProtobuf |
| 103 | + implementation projects.rxhttpConverter.converterMoshi |
| 104 | + implementation projects.rxhttpConverter.converterJackson |
| 105 | + |
| 106 | + testImplementation libs.junit |
| 107 | + androidTestImplementation libs.androidx.junit |
| 108 | + androidTestImplementation libs.androidx.espresso.core |
| 109 | + implementation libs.utilcodex |
| 110 | + |
| 111 | + testImplementation libs.kotlin.compile.testing.ksp |
| 112 | + testImplementation libs.kotlinpoet |
| 113 | + testImplementation libs.kotlinpoet.ksp |
| 114 | + testImplementation projects.rxhttpCompiler |
126 | 115 | }
|
0 commit comments