|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- // 定义适用于所有模块的依赖项 Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- google()
- mavenCentral()
-
- maven { url 'https://jitpack.io' }
- }
- dependencies {
- classpath "com.android.tools.build:gradle:7.0.1"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
- }
-
- task clean(type: Delete) {
- delete rootProject.buildDir
- }
-
- //在项目级别定义某些属性并在所有模块之间共享这些属性
- ext {
- android = [
- compile_sdk_version: 31, //使用rootProject.ext.android.compile_sdk_version
- build_tools_version: "30.0.2",
- min_sdk_version : 21,
- target_sdk_version : 31,
- version_code : 100,
- version_name : "1.0.0",
- applicationId : "com.xkl.cdl"
- ]
- versions = [
- core_ktx_version : "1.7.0",
- appcompat_version: "1.4.1",
- material_version : "1.3.0",
- lifecycle_version: "2.5.0-alpha02",
- glide_version : "4.11.0",
- ]
- //必须依赖
- dependencies_required = [
- //为属于Android框架的通用库提供扩展程序
- core_ktx : "androidx.core:core-ktx:${versions.core_ktx_version}",
- //Androidx 依赖
- appcompat : "androidx.appcompat:appcompat:${versions.appcompat_version}",
- //material_design
- material : "com.google.android.material:material:${versions.material_version}",
- //constraintlayout
- constraintlayout: "androidx.constraintlayout:constraintlayout:2.0.4",
- //lifecycle
- // lifecycle : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle_version}",
- // //lifecycle saved state module for viewmodel
- //// lifecycle_viewmodel_savestate: "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.lifecycle_version}",
- // //ViewModel
- // viewmodel : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycle_version}",
- // //livedata
- // livedata : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycle_version}",
- //java8 lifecycle_compiler
- // lifecycle_compiler : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycle_version}"
- ]
- dependencies_testImplementation = [
- junit: "junit:junit:4.+"
- ]
- dependencies_androidTestImplementation = [
- test_ext_junit : "androidx.test.ext:junit:1.1.2",
- test_espresson_core: "androidx.test.espresso:espresso-core:3.3.0"
- ]
- //依赖项
- dependencies_custom = [
- //设置状态栏和导航栏的框架 https://github.com/Zackratos/UltimateBarX
- UltimateBarX : "com.gitee.zackratos:UltimateBarX:0.8.0",
- //Glide 依赖和配置
- Glide : "com.github.bumptech.glide:glide:${versions.glide_version}",
- GlideCompiler : "com.github.bumptech.glide:compiler:${versions.glide_version}",
- //Glide translation
- GlideTranslation: "jp.wasabeef:glide-transformations:4.3.0",
- //Activity_ktx Activity扩展
- Activity_ktx : "androidx.activity:activity-ktx:1.4.0",
- //SqlCipher 需要在application 实现 : SQLiteDatabase.loadLibs(this)
- SqlCipher : "net.zetetic:android-database-sqlcipher:4.5.0",
- Sqlite : "androidx.sqlite:sqlite:2.0.1",
- //SmartRefreshLayout
- SmartRefreshLayout: "io.github.scwang90:refresh-layout-kernel:2.0.5",
- //Lottie
- Lottie : "com.airbnb.android:lottie:5.0.3",
- //Rxjava RxAndroid
- RxJava : "io.reactivex.rxjava3:rxjava:3.1.4",
- RxAndroid: "io.reactivex.rxjava3:rxandroid:3.0.0",
- //gson https://github.com/google/gson
- Gson : "com.google.code.gson:gson:2.9.0",
- //MMKV https://github.com/Tencent/MMKV/wiki/android_tutorial_cn
- MMKV : "com.tencent:mmkv:1.2.13",
- //protobuf
- protobuf_java: "com.google.protobuf:protobuf-java:3.11.0",
- protobuf_java_format: "com.googlecode.protobuf-java-format:protobuf-java-format:1.2",
- //grpc
- annotation_api: "javax.annotation:javax.annotation-api:1.3.2",
- grpc_okhttp: "io.grpc:grpc-okhttp:1.27.0",
- grpc_android: "io.grpc:grpc-android:1.27.0",
- grpc_protobuf: "io.grpc:grpc-protobuf:1.27.0",
- grpc_stub: "io.grpc:grpc-stub:1.27.0",
- //liveEventBus https://github.com/JeremyLiao/LiveEventBus
- liveEventBus : "io.github.jeremyliao:live-event-bus-x:1.8.0",
- //BigImageViewPager
- // BigImageViewPager : "com.github.SherlockGougou:BigImageViewPager:androidx-7.0.0",
- //XPopup https://github.com/li-xiaojun/XPopup
- XPopup : "com.github.li-xiaojun:XPopup:2.8.0"
- ]
-
-
- }
|