代码拉取完成,页面将自动刷新
// 复制到根目录,与project.gradle同级
// 在project.gradle引入
// apply from: "config.gradle"
// 取值
// rootProject.ext..compileSdkVersion
// compile rootProject.ext.dependencies["design"]
// rootProject.ext.libs.each {k, v -> implementation v}
// https://github.com/Blankj/AndroidUtilCode
// https://github.com/YoKeyword/Fragmentation
// $latest_version
ext {
compileSdkVersion = 29
minSdkVersion = 21
JAVA_VERSON = JavaVersion.VERSION_1_8
//implementation
libs = [
//kotlin扩展函数库
"kotlin-core-ktx" : "androidx.core:core-ktx:1.1.0",
//kotlin anko库
"kotlin_anko" : "org.jetbrains.anko:anko-common:$anko_version",
//kotlin协程库
"kotlinx_coroutines_android": "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3",
"kotlinx_coroutines_core" : "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3",
"kotlin_anko_coroutines" : "org.jetbrains.anko:anko-coroutines:$anko_version",//提供 bg 、asReference,尚未没有跟进 kotlin 1.3 的正式版协程,1.3 之后的版本中尽量不要使用
// UI Layout
"material" : "com.google.android.material:material:1.1.0",
"constraintlayout" : "androidx.constraintlayout:constraintlayout:1.1.3",
"androidx_appcompat" : "androidx.appcompat:appcompat:1.1.0",
"recyclerview" : "androidx.recyclerview:recyclerview:1.1.0",
"bravh" : "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.0-beta11",
"material-dialogs-core" : "com.afollestad.material-dialogs:core:3.2.1",
"material-dialogs-input" : "com.afollestad.material-dialogs:input:3.2.1",
// "toasty" : "com.github.GrenderG:Toasty:1.4.2",
//okhttp3
"okhttp3" : "com.squareup.okhttp3:okhttp:3.14.7",
"okhttp4" : "com.squareup.okhttp3:okhttp:4.4.0",
"logging-interceptor" : "com.squareup.okhttp3:logging-interceptor:3.14.7",
//retrofit
"retrofit2" : "com.squareup.retrofit2:retrofit:2.7.1",
"retrofit2-gson" : "com.squareup.retrofit2:converter-gson:2.7.1",
"retrofit2-rxjava2" : "com.squareup.retrofit2:adapter-rxjava2:2.7.1",
//rxjava
"rxjava2" : "io.reactivex.rxjava2:rxjava:2.2.16",
"rxjava2-rxAndroid" : "io.reactivex.rxjava2:rxandroid:2.1.1",
"rxKotlin" : "io.reactivex.rxjava2:rxkotlin:2.4.0",
//"rxpermissions" : "com.github.tbruyelle:rxpermissions:0.10.2",
//数据解析
"gson" : "com.google.code.gson:gson:2.8.5",
"kotson" : "com.github.salomonbrys.kotson:kotson:2.5.0",
//事件分发
"eventbus" : "org.greenrobot:eventbus:3.1.1",
"live_event_bus" : "com.jeremyliao:live-event-bus-x:1.5.7",
//图片加载
"glide" : "com.github.bumptech.glide:glide:4.10.0",
//动画
"lottie" : "com.airbnb.android:lottie:2.5.5",
//Log
"logger" : "com.orhanobut:logger:2.2.0",
// ARouter
"arouter" : "com.alibaba:arouter-api:1.4.1",
///图片压缩 配合rxjava和rxAndroid使用
//"Luban" : "top.zibin:Luban:1.0.9",
//方法数上限
"multidex" : "androidx.multidex:multidex:2.0.1",
//Lifecycle依赖包括LiveData 和ViewModel.
"lifecycle-extensions" : "androidx.lifecycle:lifecycle-extensions:2.2.0",
"lifecycle-viewmodel" : "androidx.lifecycle:lifecycle-viewmodel:2.2.0",
"lifecycle-livedata" : "androidx.lifecycle:lifecycle-livedata:2.2.0",
"lifecycle-livedata-ktx" : "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0", //kotlin 风格观察livedata
"lifecycle-runtime" : "androidx.lifecycle:lifecycle-runtime:2.2.0",
//room
"room-common" : "androidx.room:room-common:2.2.3",
"room-runtime" : "androidx.room:room-runtime:2.2.3",
// 可使用委托的方式创建viewModel
"fragment-ktx" : "androidx.fragment:fragment-ktx:1.1.0"
//"protobuf" : "com.google.protobuf:protobuf-java:$protobuf_version",
]
//注解插件 annotationProcessor , kotlin 使用 kapt引入 ,先使用kapt插件 apply plugin: 'kotlin-kapt'
apt = [
//lifecycle
"lifecycle-compiler": "androidx.lifecycle:lifecycle-compiler:2.2.0",
//room
"room-compiler" : "androidx.room:room-compiler:2.2.3",
//ARouter
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
//glide
"glide-compiler" : "com.github.bumptech.glide:compiler:4.10.0"
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。