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

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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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.lifecycle:lifecycle-livedata-ktx:2.3.1'
  73. // implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
  74. // implementation 'androidx.appcompat:appcompat:1.2.0'
  75. // implementation 'com.google.android.material:material:1.3.0'
  76. // implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  77. // implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
  78. // implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
  79. rootProject.ext.dependencies_required.each { k, v -> implementation v }
  80. testImplementation rootProject.ext.dependencies_testImplementation.junit
  81. rootProject.ext.dependencies_androidTestImplementation.each { k, v -> androidTestImplementation v }
  82. def customDependencies = rootProject.ext.dependencies_custom
  83. //SmartRefreshLayout
  84. implementation customDependencies.SmartRefreshLayout
  85. implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
  86. //SqlCipher
  87. implementation customDependencies.SqlCipher
  88. //androidx-sqlite
  89. implementation customDependencies.Sqlite
  90. //Lottie
  91. implementation customDependencies.Lottie
  92. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  93. //Gson
  94. implementation customDependencies.Gson
  95. //protobuf
  96. implementation customDependencies.protobuf_java
  97. implementation customDependencies.protobuf_java_format
  98. //grpc
  99. implementation customDependencies.annotation_api
  100. implementation customDependencies.grpc_okhttp
  101. implementation customDependencies.grpc_android
  102. implementation customDependencies.grpc_protobuf
  103. implementation customDependencies.grpc_stub
  104. //XPopup
  105. implementation customDependencies.XPopup
  106. }