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

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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. signingConfigs {
  9. relese {
  10. storeFile file('../xuekaole.jks')
  11. keyAlias 'XueKaoLe'
  12. keyPassword '1Ucik75SH9uJxPrV'
  13. storePassword '0PuY5usdSTULJxS0'
  14. }
  15. }
  16. compileSdk androidConfig.compile_sdk_version
  17. buildToolsVersion androidConfig.build_tools_version
  18. defaultConfig {
  19. applicationId androidConfig.applicationId
  20. minSdk androidConfig.min_sdk_version
  21. targetSdk androidConfig.target_sdk_version
  22. versionCode androidConfig.version_code
  23. versionName androidConfig.version_name
  24. multiDexEnabled true //解决64k 分包限制
  25. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  26. //java环境roomSchemaLocation配置
  27. // javaCompileOptions {
  28. // annotationProcessorOptions {
  29. // arguments = [
  30. // "room.schemaLocation" : "$projectDir/schemas".toString(),
  31. // "room.incremental" : "true",
  32. // "room.expandProjection" :"true"
  33. // ]
  34. // }
  35. // }
  36. //Kotlin环境RoomSchemaLocation配置
  37. kapt {
  38. arguments {
  39. arg("room.schemaLocation", "$projectDir/schemas")
  40. }
  41. }
  42. ndk {
  43. // 只接入 armeabi-v7a 和 x86 架构
  44. abiFilters 'armeabi-v7a', 'arm64-v8a'
  45. }
  46. externalNativeBuild {
  47. cmake {
  48. cppFlags "-std=c++11"
  49. }
  50. }
  51. }
  52. /*构建类型: 定义Gradle在构建阶段和打包应用时使用的某些属性*/
  53. buildTypes {
  54. release {
  55. // buildConfigField "int", "PORT", "10006"
  56. // buildConfigField "String", "ENVIRONMENT", "\"production\""
  57. minifyEnabled false
  58. shrinkResources false
  59. debuggable = false
  60. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  61. signingConfig signingConfigs.relese
  62. }
  63. debug {
  64. // buildConfigField "int", "PORT", "10003"
  65. // buildConfigField "String", "ENVIRONMENT", "\"development\""
  66. minifyEnabled false
  67. zipAlignEnabled false
  68. debuggable = true
  69. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  70. signingConfig signingConfigs.relese
  71. }
  72. }
  73. applicationVariants.all {
  74. it.outputs.each {
  75. it.outputFileName = "学考乐本地_${defaultConfig.versionName}.apk"
  76. }
  77. }
  78. //配置产品变种 与 构建变体
  79. //flavorDimensions :变种维度
  80. // flavorDimensions "version"
  81. // productFlavors{ //产品变种
  82. // demo{
  83. // dimension "version"
  84. // //applicationId后追加 .demo 也可以重新定义applicationId 属性
  85. // applicationIdSuffix ".demo"
  86. // versionNameSuffix "-demo"
  87. // }
  88. // full {
  89. // dimension "version"
  90. // applicationIdSuffix ".full"
  91. // versionNameSuffix '-full'
  92. // }
  93. // }
  94. //变体过滤器
  95. // variantFilter { variant ->
  96. // def names = variant.flavors*.name
  97. // if (name.contains("demo")){
  98. // setIgnore(true)
  99. // }
  100. // }
  101. compileOptions {
  102. coreLibraryDesugaringEnabled true //为了使用jdk8的脱糖属性
  103. sourceCompatibility JavaVersion.VERSION_1_8
  104. targetCompatibility JavaVersion.VERSION_1_8
  105. }
  106. kotlinOptions {
  107. jvmTarget = '1.8'
  108. }
  109. buildFeatures {
  110. viewBinding true
  111. dataBinding true
  112. }
  113. sourceSets {
  114. main {
  115. res.srcDirs("svg")
  116. }
  117. }
  118. }
  119. dependencies {
  120. implementation fileTree(include: ['*.jar', "*.aar"], dir: 'libs')
  121. // implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  122. implementation project(path: ':lib:common')
  123. // implementation 'androidx.appcompat:appcompat:1.2.0'
  124. // implementation 'com.google.android.material:material:1.3.0'
  125. // implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  126. implementation project(path: ':videoplayer')
  127. implementation 'androidx.appcompat:appcompat:1.3.0'
  128. implementation 'com.google.android.material:material:1.4.0'
  129. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  130. // implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
  131. // implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
  132. // implementation 'androidx.appcompat:appcompat:1.2.0'
  133. // implementation 'com.google.android.material:material:1.3.0'
  134. // implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  135. // implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
  136. // implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
  137. rootProject.ext.dependencies_required.each { k, v -> implementation v }
  138. testImplementation rootProject.ext.dependencies_testImplementation.junit
  139. rootProject.ext.dependencies_androidTestImplementation.each { k, v -> androidTestImplementation v }
  140. def customDependencies = rootProject.ext.dependencies_custom
  141. //SmartRefreshLayout
  142. implementation customDependencies.SmartRefreshLayout
  143. implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
  144. //SqlCipher
  145. implementation customDependencies.SqlCipher
  146. //androidx-sqlite
  147. implementation customDependencies.Sqlite
  148. //Lottie
  149. implementation customDependencies.Lottie
  150. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  151. //Gson
  152. implementation customDependencies.Gson
  153. //protobuf
  154. implementation customDependencies.protobuf_java
  155. implementation customDependencies.protobuf_java_format
  156. //grpc
  157. implementation customDependencies.annotation_api
  158. implementation customDependencies.grpc_okhttp
  159. implementation customDependencies.grpc_android
  160. implementation customDependencies.grpc_protobuf
  161. implementation customDependencies.grpc_stub
  162. //XPopup
  163. implementation customDependencies.XPopup
  164. implementation customDependencies.XPopupExt
  165. //精美日历 calendarview
  166. implementation customDependencies.CalendarView
  167. // FlexBoxLayoutManager
  168. implementation customDependencies.FlexBoxLayoutManager
  169. //图标
  170. implementation customDependencies.Chart
  171. //Room
  172. implementation customDependencies.Room_Runtime
  173. kapt customDependencies.Room_Compiler
  174. //Paging
  175. // implementation customDependencies.Paging
  176. //Room_Paging
  177. // implementation(customDependencies.Room_Paging){
  178. // force = true
  179. // }
  180. // implementation "me.zhanghai.android.materialratingbar:library:1.4.0"
  181. implementation 'com.xl.ratingbar:ratingbar:0.1.1'
  182. implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.5'
  183. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
  184. }