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

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
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. id 'kotlin-kapt'
  5. }
  6. def androidConfig = rootProject.ext.android
  7. android {
  8. compileSdk androidConfig.compile_sdk_version
  9. buildToolsVersion androidConfig.build_tools_version
  10. defaultConfig {
  11. applicationId androidConfig.applicationId
  12. minSdk androidConfig.min_sdk_version
  13. targetSdk androidConfig.target_sdk_version
  14. versionCode androidConfig.version_code
  15. versionName androidConfig.version_name
  16. multiDexEnabled true //解决64k 分包限制
  17. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  18. }
  19. /*构建类型: 定义Gradle在构建阶段和打包应用时使用的某些属性*/
  20. buildTypes {
  21. release {
  22. minifyEnabled false
  23. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  24. }
  25. }
  26. //配置产品变种 与 构建变体
  27. //flavorDimensions :变种维度
  28. // flavorDimensions "version"
  29. // productFlavors{ //产品变种
  30. // demo{
  31. // dimension "version"
  32. // //applicationId后追加 .demo 也可以重新定义applicationId 属性
  33. // applicationIdSuffix ".demo"
  34. // versionNameSuffix "-demo"
  35. // }
  36. // full {
  37. // dimension "version"
  38. // applicationIdSuffix ".full"
  39. // versionNameSuffix '-full'
  40. // }
  41. // }
  42. //变体过滤器
  43. // variantFilter { variant ->
  44. // def names = variant.flavors*.name
  45. // if (name.contains("demo")){
  46. // setIgnore(true)
  47. // }
  48. // }
  49. compileOptions {
  50. coreLibraryDesugaringEnabled true //为了使用jdk8的脱糖属性
  51. sourceCompatibility JavaVersion.VERSION_1_8
  52. targetCompatibility JavaVersion.VERSION_1_8
  53. }
  54. kotlinOptions {
  55. jvmTarget = '1.8'
  56. }
  57. buildFeatures {
  58. viewBinding true
  59. dataBinding true
  60. }
  61. sourceSets {
  62. main {
  63. res.srcDirs("svg")
  64. }
  65. }
  66. }
  67. dependencies {
  68. implementation fileTree(include: ['*.jar', "*.aar"], dir: 'libs')
  69. // implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  70. implementation project(path: ':lib:common')
  71. implementation project(path: ':videoplayer')
  72. implementation 'androidx.appcompat:appcompat:1.2.0'
  73. implementation 'com.google.android.material:material:1.3.0'
  74. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  75. // implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
  76. // implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
  77. // implementation 'androidx.appcompat:appcompat:1.2.0'
  78. // implementation 'com.google.android.material:material:1.3.0'
  79. // implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  80. // implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
  81. // implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
  82. rootProject.ext.dependencies_required.each { k, v -> implementation v }
  83. testImplementation rootProject.ext.dependencies_testImplementation.junit
  84. rootProject.ext.dependencies_androidTestImplementation.each { k, v -> androidTestImplementation v }
  85. def customDependencies = rootProject.ext.dependencies_custom
  86. //SmartRefreshLayout
  87. implementation customDependencies.SmartRefreshLayout
  88. implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
  89. //SqlCipher
  90. implementation customDependencies.SqlCipher
  91. //androidx-sqlite
  92. implementation customDependencies.Sqlite
  93. //Lottie
  94. implementation customDependencies.Lottie
  95. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  96. //Gson
  97. implementation customDependencies.Gson
  98. //protobuf
  99. implementation customDependencies.protobuf_java
  100. implementation customDependencies.protobuf_java_format
  101. //grpc
  102. implementation customDependencies.annotation_api
  103. implementation customDependencies.grpc_okhttp
  104. implementation customDependencies.grpc_android
  105. implementation customDependencies.grpc_protobuf
  106. implementation customDependencies.grpc_stub
  107. //XPopup
  108. implementation customDependencies.XPopup
  109. implementation customDependencies.XPopupExt
  110. //精美日历 calendarview
  111. implementation customDependencies.CalendarView
  112. // FlexBoxLayoutManager
  113. implementation customDependencies.FlexBoxLayoutManager
  114. //图标
  115. implementation customDependencies.Chart
  116. }