build.gradle 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. plugins {
  2. id 'com.android.application'
  3. id 'dagger.hilt.android.plugin'
  4. }
  5. android {
  6. namespace 'com.datarecovery.master'
  7. compileSdk rootProject.compileSdkVersion
  8. defaultConfig {
  9. applicationId rootProject.applicationId
  10. minSdk rootProject.minSdkVersion
  11. targetSdk rootProject.targetSdkVersion
  12. versionCode rootProject.versionCode
  13. versionName rootProject.versionName
  14. ndk {
  15. //noinspection ChromeOsAbiSupport
  16. abiFilters "arm64-v8a"
  17. }
  18. }
  19. signingConfigs {
  20. debug {
  21. storeFile file("keystore/recover.jks")
  22. storePassword "recover888"
  23. keyAlias "recover"
  24. keyPassword "recover888"
  25. }
  26. release {
  27. storeFile file("keystore/recover.jks")
  28. storePassword "recover888"
  29. keyAlias "recover"
  30. keyPassword "recover888"
  31. }
  32. }
  33. buildTypes {
  34. release {
  35. minifyEnabled true
  36. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  37. signingConfig signingConfigs.release
  38. buildConfigField "boolean", "isLocalNetwork", "false"
  39. buildConfigField "String", "HOST", "\"$prod_host\""
  40. }
  41. debug {
  42. minifyEnabled false
  43. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  44. signingConfig signingConfigs.debug
  45. buildConfigField "boolean", "isLocalNetwork", "true"
  46. buildConfigField "String", "HOST", "\"$test_host\""
  47. }
  48. }
  49. compileOptions {
  50. sourceCompatibility JavaVersion.VERSION_1_8
  51. targetCompatibility JavaVersion.VERSION_1_8
  52. }
  53. buildFeatures {
  54. viewBinding true
  55. dataBinding true
  56. }
  57. applicationVariants.configureEach { variant ->
  58. def date = new Date().format("YYMMddHHmmss")
  59. variant.outputs.configureEach {
  60. def fileName = "${defaultConfig.applicationId}" +
  61. "-v${defaultConfig.versionName}" +
  62. "-${variant.buildType.name}" +
  63. "-${date}" +
  64. ".apk"
  65. outputFileName = fileName
  66. }
  67. }
  68. sourceSets {
  69. main { jniLibs.srcDirs = ['libs'] }
  70. }
  71. configurations.configureEach {
  72. resolutionStrategy {
  73. // don't cache changing modules at all
  74. cacheChangingModulesFor 10, 'seconds'
  75. }
  76. }
  77. }
  78. dependencies {
  79. //jar or aar
  80. implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  81. //Atmob SDK
  82. implementation 'extra.common:base:1.0.0-SNAPSHOT'
  83. implementation "extra.pack:channel:1.1.0-SNAPSHOT"
  84. implementation "extra.common:core:2.0.3-SNAPSHOT" //base utils
  85. implementation "extra.common:network:1.1.0-SNAPSHOT"
  86. implementation "extra.common:rxjava:1.1.0-SNAPSHOT"
  87. implementation "extra.common:user:1.0.1-SNAPSHOT" //get user data(includes device info)
  88. implementation("plus.pay:pay:1.1.0-SNAPSHOT") {
  89. exclude group: 'third.pay', module: 'ali'
  90. }
  91. api 'com.alipay.sdk:alipaysdk-android:15.8.16@aar'
  92. //oaid
  93. implementation "extra.common:oaid:1.1.0-SNAPSHOT"
  94. //AppCompat
  95. implementation "androidx.appcompat:appcompat:$rootProject.appcompat_version"
  96. //Material
  97. implementation "com.google.android.material:material:$rootProject.material_version"
  98. //RecyclerView
  99. implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerview_version"
  100. //ConstraintLayout
  101. implementation "androidx.constraintlayout:constraintlayout:$rootProject.constraintlayout_version"
  102. //Gson
  103. implementation "com.google.code.gson:gson:$rootProject.gson_version"
  104. //Lifecycle
  105. implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycle_version"
  106. implementation "androidx.lifecycle:lifecycle-livedata:$rootProject.lifecycle_version"
  107. implementation "androidx.lifecycle:lifecycle-reactivestreams:$rootProject.lifecycle_version"
  108. implementation "androidx.lifecycle:lifecycle-process:$rootProject.lifecycle_version"
  109. //Hilt
  110. implementation "com.google.dagger:hilt-android:$rootProject.hilt_version"
  111. annotationProcessor "com.google.dagger:hilt-compiler:$rootProject.hilt_version"
  112. //Glide
  113. implementation "com.github.bumptech.glide:glide:$rootProject.glide_version"
  114. annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.glide_version"
  115. //MMKV
  116. implementation "com.tencent:mmkv:$rootProject.mmkv_version"
  117. //immersionbar
  118. implementation "com.gyf.immersionbar:immersionbar:$rootProject.immersionbar_version"
  119. implementation "com.gyf.immersionbar:immersionbar-components:$rootProject.immersionbar_version"
  120. //RefreshLayout
  121. implementation "androidx.swiperefreshlayout:swiperefreshlayout:$rootProject.swiperefreshlayout_version"
  122. //PhotoView
  123. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  124. }