学考乐离线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
2 years ago
2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  17. }
  18. /*构建类型: 定义Gradle在构建阶段和打包应用时使用的某些属性*/
  19. buildTypes {
  20. release {
  21. minifyEnabled false
  22. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  23. }
  24. }
  25. //配置产品变种 与 构建变体
  26. //flavorDimensions :变种维度
  27. // flavorDimensions "version"
  28. // productFlavors{ //产品变种
  29. // demo{
  30. // dimension "version"
  31. // //applicationId后追加 .demo 也可以重新定义applicationId 属性
  32. // applicationIdSuffix ".demo"
  33. // versionNameSuffix "-demo"
  34. // }
  35. // full {
  36. // dimension "version"
  37. // applicationIdSuffix ".full"
  38. // versionNameSuffix '-full'
  39. // }
  40. // }
  41. //变体过滤器
  42. // variantFilter { variant ->
  43. // def names = variant.flavors*.name
  44. // if (name.contains("demo")){
  45. // setIgnore(true)
  46. // }
  47. // }
  48. compileOptions {
  49. sourceCompatibility JavaVersion.VERSION_1_8
  50. targetCompatibility JavaVersion.VERSION_1_8
  51. }
  52. kotlinOptions {
  53. jvmTarget = '1.8'
  54. }
  55. buildFeatures {
  56. viewBinding true
  57. dataBinding true
  58. }
  59. sourceSets {
  60. main {
  61. res.srcDirs("svg")
  62. }
  63. }
  64. }
  65. dependencies {
  66. implementation fileTree(include: ['*.jar',"*.aar"], dir: 'libs')
  67. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  68. implementation project(path: ':lib:common')
  69. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
  70. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
  71. implementation 'androidx.appcompat:appcompat:1.2.0'
  72. implementation 'com.google.android.material:material:1.3.0'
  73. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  74. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
  75. implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
  76. rootProject.ext.dependencies_required.each{ k, v -> implementation v}
  77. testImplementation rootProject.ext.dependencies_testImplementation.junit
  78. rootProject.ext.dependencies_androidTestImplementation.each{ k,v -> androidTestImplementation v}
  79. def customDependencies = rootProject.ext.dependencies_custom
  80. //SmartRefreshLayout
  81. implementation customDependencies.SmartRefreshLayout
  82. implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
  83. //SqlCipher
  84. implementation customDependencies.SqlCipher
  85. //androidx-sqlite
  86. implementation customDependencies.Sqlite
  87. //Lottie
  88. implementation customDependencies.Lottie
  89. }