学考乐离线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 3.2KB

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
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.3.2",
  31. appcompat_version: "1.4.1",
  32. material_version : "1.3.0",
  33. lifecycle_version: "2.5.0-alpha02"
  34. ]
  35. //必须依赖
  36. dependencies_required = [
  37. //为属于Android框架的通用库提供扩展程序
  38. core_ktx : "androidx.core:core-ktx:${versions.core_ktx_version}",
  39. //Androidx 依赖
  40. appcompat : "androidx.appcompat:appcompat:${versions.appcompat_version}",
  41. //material_design
  42. material : "com.google.android.material:material:${versions.material_version}",
  43. //constraintlayout
  44. constraintlayout : "androidx.constraintlayout:constraintlayout:2.0.4",
  45. //lifecycle
  46. // lifecycle : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle_version}",
  47. // //lifecycle saved state module for viewmodel
  48. //// lifecycle_viewmodel_savestate: "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.lifecycle_version}",
  49. // //ViewModel
  50. // viewmodel : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycle_version}",
  51. // //livedata
  52. // livedata : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycle_version}",
  53. //java8 lifecycle_compiler
  54. // lifecycle_compiler : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycle_version}"
  55. ]
  56. dependencies_testImplementation = [
  57. junit: "junit:junit:4.+"
  58. ]
  59. dependencies_androidTestImplementation = [
  60. test_ext_junit : "androidx.test.ext:junit:1.1.2",
  61. test_espresson_core: "androidx.test.espresso:espresso-core:3.3.0"
  62. ]
  63. //依赖项
  64. dependencies_custom = [
  65. //设置状态栏和导航栏的框架 https://github.com/Zackratos/UltimateBarX
  66. UltimateBarX: "com.gitee.zackratos:UltimateBarX:0.8.0",
  67. ]
  68. //注解
  69. // dependencies_kapt = [
  70. // lifecycle_compiler: "androidx.lifecycle:lifecycle-compiler:${versions.lifecycle_version}",
  71. //
  72. // ]
  73. }