学考乐离线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 6.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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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: 32, //使用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 : "1.0.0",
  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.1",
  77. Sqlite : "androidx.sqlite:sqlite:2.3.0-alpha03",
  78. // Sqlite : "androidx.sqlite:sqlite:2.0.1",
  79. //SmartRefreshLayout
  80. SmartRefreshLayout: "io.github.scwang90:refresh-layout-kernel:2.0.5",
  81. //Lottie
  82. Lottie : "com.airbnb.android:lottie:5.0.3",
  83. //Rxjava RxAndroid
  84. RxJava : "io.reactivex.rxjava3:rxjava:3.1.4",
  85. RxAndroid: "io.reactivex.rxjava3:rxandroid:3.0.0",
  86. //gson https://github.com/google/gson
  87. Gson : "com.google.code.gson:gson:2.9.0",
  88. //MMKV https://github.com/Tencent/MMKV/wiki/android_tutorial_cn
  89. MMKV : "com.tencent:mmkv:1.2.13",
  90. //protobuf
  91. protobuf_java: "com.google.protobuf:protobuf-java:3.11.0",
  92. protobuf_java_format: "com.googlecode.protobuf-java-format:protobuf-java-format:1.2",
  93. //grpc
  94. annotation_api: "javax.annotation:javax.annotation-api:1.3.2",
  95. grpc_okhttp: "io.grpc:grpc-okhttp:1.27.0",
  96. grpc_android: "io.grpc:grpc-android:1.27.0",
  97. grpc_protobuf: "io.grpc:grpc-protobuf:1.27.0",
  98. grpc_stub: "io.grpc:grpc-stub:1.27.0",
  99. //liveEventBus https://github.com/JeremyLiao/LiveEventBus
  100. liveEventBus : "io.github.jeremyliao:live-event-bus-x:1.8.0",
  101. //BigImageViewPager
  102. // BigImageViewPager : "com.github.SherlockGougou:BigImageViewPager:androidx-7.0.0",
  103. //XPopup https://github.com/li-xiaojun/XPopup
  104. XPopup : "com.github.li-xiaojun:XPopup:2.8.0",
  105. //XPopupExt XPopup扩展
  106. XPopupExt:"com.github.li-xiaojun:XPopupExt:0.0.8",
  107. //精美日历 calendarview https://github.com/huanghaibin-dev/CalendarView
  108. CalendarView : "com.haibin:calendarview:3.7.1",
  109. //google 流式布局 https://blog.csdn.net/ww897532167/article/details/85952498 https://github.com/google/flexbox-layout
  110. FlexBoxLayoutManager : "com.google.android.flexbox:flexbox:3.0.0",
  111. //图表
  112. Chart: "com.github.PhilJay:MPAndroidChart:v3.1.0",
  113. //数据库 Room
  114. // Room_Runtime : "androidx.room:room-runtime:2.4.2",
  115. // Room_Compiler : "androidx.room:room-compiler:2.4.2",
  116. Room_Runtime : "androidx.room:room-runtime:2.3.0-alpha01",
  117. Room_Compiler : "androidx.room:room-compiler:2.3.0-alpha01",
  118. //Paging
  119. Paging: "androidx.paging:paging-runtime:3.0.0-alpha08",
  120. //room_paging
  121. // Room_Paging : "androidx.room:room-paging:${versions.lifecycle_version}"
  122. ]
  123. }