59 lines
2.2 KiB
Groovy
59 lines
2.2 KiB
Groovy
apply plugin: 'com.android.library'
|
||
|
||
android {
|
||
namespace 'com.xiangxue.common'
|
||
compileSdk app_android.compileSdkVersion
|
||
compileSdkVersion app_android.compileSdkVersion
|
||
buildToolsVersion app_android.buildToolsVersion
|
||
defaultConfig {
|
||
minSdk app_android.minSdkVersion
|
||
minSdkVersion app_android.minSdkVersion
|
||
targetSdk app_android.targetSdkVersion
|
||
targetSdkVersion app_android.targetSdkVersion
|
||
consumerProguardFiles 'consumer-rules.pro'
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled false
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
dependencies {
|
||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||
api 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
|
||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||
//v1.5
|
||
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||
// Because RxAndroid releases are few and far between, it is recommended you also
|
||
// explicitly depend on RxJava's latest version for bug fixes and new features.
|
||
// (see https://github.com/ReactiveX/RxJava/releases for latest 2.x.x version)
|
||
api 'io.reactivex.rxjava2:rxjava:2.2.12'
|
||
|
||
|
||
api 'androidx.preference:preference:1.0.0'
|
||
|
||
|
||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||
testImplementation 'junit:junit:4.12'
|
||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||
|
||
// 因为每一个 "子Module"都依赖了 common,所有当我们在 common中依赖 arouter_api(柱状)
|
||
// 就等于 全部都依赖了 arouter_api
|
||
api project(":arouter_api")
|
||
|
||
// Kotlin 标准库(DataBinding 在 AGP 8.x 中需要,参考 android-im 的做法)
|
||
// 使用 api 让所有依赖 common 的模块都能获得 Kotlin 标准库
|
||
api 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22'
|
||
}
|