学考乐离线App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 4.3KB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // 定义适用于所有模块的依赖项 Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. google()
  5. mavenCentral()
  6. maven { url 'https://jitpack.io' }
  7. }
  8. dependencies {
  9. classpath "com.android.tools.build:gradle:7.0.1"
  10. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
  11. // NOTE: Do not place your application dependencies here; they belong
  12. // in the individual module build.gradle files
  13. }
  14. }
  15. task clean(type: Delete) {
  16. delete rootProject.buildDir
  17. }
  18. //在项目级别定义某些属性并在所有模块之间共享这些属性
  19. ext {
  20. android = [
  21. compile_sdk_version: 31, //使用rootProject.ext.android.compile_sdk_version
  22. build_tools_version: "30.0.2",
  23. min_sdk_version : 21,
  24. target_sdk_version : 31,
  25. version_code : 100,
  26. version_name : "100",
  27. applicationId : "com.xkl.cdl"
  28. ]
  29. versions = [
  30. core_ktx_version : "1.7.0",
  31. appcompat_version: "1.4.1",
  32. material_version : "1.3.0",
  33. lifecycle_version: "2.5.0-alpha02",
  34. glide_version : "4.11.0",
  35. ]
  36. //必须依赖
  37. dependencies_required = [
  38. //为属于Android框架的通用库提供扩展程序
  39. core_ktx : "androidx.core:core-ktx:${versions.core_ktx_version}",
  40. //Androidx 依赖
  41. appcompat : "androidx.appcompat:appcompat:${versions.appcompat_version}",
  42. //material_design
  43. material : "com.google.android.material:material:${versions.material_version}",
  44. //constraintlayout
  45. constraintlayout: "androidx.constraintlayout:constraintlayout:2.0.4",
  46. //lifecycle
  47. // lifecycle : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle_version}",
  48. // //lifecycle saved state module for viewmodel
  49. //// lifecycle_viewmodel_savestate: "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.lifecycle_version}",
  50. // //ViewModel
  51. // viewmodel : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycle_version}",
  52. // //livedata
  53. // livedata : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycle_version}",
  54. //java8 lifecycle_compiler
  55. // lifecycle_compiler : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycle_version}"
  56. ]
  57. dependencies_testImplementation = [
  58. junit: "junit:junit:4.+"
  59. ]
  60. dependencies_androidTestImplementation = [
  61. test_ext_junit : "androidx.test.ext:junit:1.1.2",
  62. test_espresson_core: "androidx.test.espresso:espresso-core:3.3.0"
  63. ]
  64. //依赖项
  65. dependencies_custom = [
  66. //设置状态栏和导航栏的框架 https://github.com/Zackratos/UltimateBarX
  67. UltimateBarX : "com.gitee.zackratos:UltimateBarX:0.8.0",
  68. //Glide 依赖和配置
  69. Glide : "com.github.bumptech.glide:glide:${versions.glide_version}",
  70. GlideCompiler : "com.github.bumptech.glide:compiler:${versions.glide_version}",
  71. //Glide translation
  72. GlideTranslation: "jp.wasabeef:glide-transformations:4.3.0",
  73. //Activity_ktx Activity扩展
  74. Activity_ktx : "androidx.activity:activity-ktx:1.4.0",
  75. //SqlCipher 需要在application 实现 : SQLiteDatabase.loadLibs(this)
  76. SqlCipher : "net.zetetic:android-database-sqlcipher:4.5.0",
  77. Sqlite : "androidx.sqlite:sqlite:2.0.1",
  78. //SmartRefreshLayout
  79. SmartRefreshLayout: "io.github.scwang90:refresh-layout-kernel:2.0.5",
  80. //Lottie
  81. Lottie : "com.airbnb.android:lottie:5.0.3",
  82. //Rxjava RxAndroid
  83. RxJava : "io.reactivex.rxjava3:rxjava:3.1.4",
  84. RxAndroid: "io.reactivex.rxjava3:rxandroid:3.0.0",
  85. //gson https://github.com/google/gson
  86. Gson : "com.google.code.gson:gson:2.9.0",
  87. //MMKV https://github.com/Tencent/MMKV/wiki/android_tutorial_cn
  88. MMKV : "com.tencent:mmkv:1.2.13"
  89. ]
  90. }