build.gradle 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. plugins {
  2. id 'com.android.application'
  3. }
  4. def releaseTime() {
  5. return new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("UTC"))
  6. }
  7. android {
  8. compileSdkVersion 30
  9. defaultConfig {
  10. applicationId "com.edufound.reader"
  11. minSdkVersion 21 //>23导致无法直接签名
  12. targetSdkVersion 30
  13. versionCode 22
  14. versionName "2.2"
  15. flavorDimensions "versionCode"
  16. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
  17. ndk {
  18. abiFilters "armeabi-v7a"
  19. }
  20. multiDexEnabled true
  21. }
  22. signingConfigs {
  23. efunboxKey {
  24. keyAlias "edufound_key"
  25. keyPassword "edufound321"
  26. storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
  27. storePassword "edufound123"
  28. v1SigningEnabled true
  29. v2SigningEnabled true
  30. }
  31. }
  32. buildTypes {
  33. release {
  34. minifyEnabled false
  35. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  36. signingConfig signingConfigs.efunboxKey
  37. applicationVariants.all { variant ->
  38. variant.outputs.each { output ->
  39. def outputFile = output.outputFileName
  40. if (outputFile != null && output.outputFileName.endsWith('.apk')) {
  41. def fileName = "efunbox_reader_v${defaultConfig.versionCode}_${releaseTime()}_${variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE}_r.apk"
  42. def channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
  43. def newoutputFile = "";
  44. if (channel == ("2006")) {
  45. newoutputFile = "\\义方\\"
  46. }
  47. output.outputFileName = new File(newoutputFile, fileName)
  48. }
  49. }
  50. }
  51. }
  52. debug {
  53. minifyEnabled false
  54. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  55. signingConfig signingConfigs.efunboxKey
  56. zipAlignEnabled true
  57. }
  58. }
  59. sourceSets {
  60. main {
  61. jniLibs.srcDirs = ['libs']
  62. res.srcDirs = [
  63. 'src/main/res', //默认只有这一个路径
  64. 'src/fragmentRecommend', //首页推荐
  65. 'src/fragmentUser',//首页我的
  66. 'src/activityLoginAlert',//登录弹窗
  67. 'src/exception',//异常弹窗
  68. 'src/testimg'//测试图片
  69. ]
  70. }
  71. }
  72. productFlavors {
  73. //义方
  74. channel_efunbox {
  75. signingConfig signingConfigs.efunboxKey
  76. manifestPlaceholders = [
  77. appCode: "3006",
  78. appIcon: "@drawable/icon",
  79. ]
  80. }
  81. //百度(小度音响)
  82. channel_baidu {
  83. signingConfig signingConfigs.efunboxKey
  84. manifestPlaceholders = [
  85. appCode: "3003",
  86. appIcon: "@drawable/icon",
  87. ]
  88. }
  89. //天猫精灵
  90. channel_tmail {
  91. signingConfig signingConfigs.efunboxKey
  92. manifestPlaceholders = [
  93. appCode: "3002",
  94. appIcon: "@drawable/icon",
  95. ]
  96. }
  97. //小爱音响
  98. channel_xayx {
  99. applicationIdSuffix ".xiaoai"
  100. signingConfig signingConfigs.efunboxKey
  101. manifestPlaceholders = [
  102. appCode: "2016",
  103. appIcon: "@drawable/icon",
  104. ]
  105. }
  106. }
  107. productFlavors.all {
  108. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  109. }
  110. compileOptions {
  111. sourceCompatibility JavaVersion.VERSION_1_8
  112. targetCompatibility JavaVersion.VERSION_1_8
  113. }
  114. aaptOptions {
  115. additionalParameters = ["--warn-manifest-validation"]
  116. }
  117. }
  118. dependencies {
  119. implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  120. implementation 'androidx.appcompat:appcompat:1.0.0'
  121. implementation 'com.github.bumptech.glide:glide:4.12.0'
  122. annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  123. implementation 'jp.wasabeef:glide-transformations:4.3.0'
  124. implementation('com.zhousf.lib:okhttp3:2.9.9') {
  125. exclude(module: 'support-annotations')
  126. exclude(module: 'gson')
  127. }
  128. //gson
  129. implementation 'com.google.code.gson:gson:2.8.9'
  130. //logger
  131. implementation 'com.orhanobut:logger:2.2.0'
  132. //mmkv
  133. implementation 'com.tencent:mmkv:1.2.11'
  134. implementation 'com.uber.autodispose2:autodispose:2.0.0'
  135. implementation 'com.uber.autodispose2:autodispose-android:2.0.0'
  136. implementation 'com.uber.autodispose2:autodispose-lifecycle:2.0.0'
  137. implementation 'com.uber.autodispose2:autodispose-androidx-lifecycle:2.0.0'
  138. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  139. implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
  140. implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
  141. // required, enough for most devices.
  142. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
  143. // ExoPlayer as IMediaPlayer: optional, experimental
  144. implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
  145. //JZ播放器
  146. implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
  147. //recyclerview
  148. implementation 'androidx.recyclerview:recyclerview:1.1.0'
  149. //驰声
  150. implementation 'io.github.ChivoxSupport:vox-sdk:2.2.23+2.0.8.1'
  151. //rxBind
  152. implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
  153. implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
  154. implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
  155. implementation "androidx.constraintlayout:constraintlayout:2.1.1"
  156. // To use constraintlayout in compose
  157. implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01"
  158. //解除Android P 反射机制
  159. implementation 'com.github.tiann:FreeReflection:3.1.0'
  160. //百度(小度音响SDK)
  161. implementation 'com.baidu.duer.botsdk:bot-sdk-android:1.56.1'
  162. // 3rd Party
  163. implementation "com.alibaba:fastjson:${FASTJSON_VERSION}"
  164. //zxing
  165. implementation 'com.google.zxing:android-core:3.3.0'
  166. implementation 'com.google.zxing:core:3.3.2'
  167. implementation files('libs/gcs-authservice-1.0.0.21.jar')
  168. implementation files('libs/registry-api-1.1.16-20201203.085134-3.jar')
  169. implementation files('libs/aranger.jar')
  170. //小米音响
  171. implementation files('libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar')
  172. //超长图imageview
  173. implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
  174. //blibili弹幕
  175. implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
  176. implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
  177. // # Other ABIs: optional
  178. implementation 'com.github.ctiao:ndkbitmap-armv5:0.9.21'
  179. implementation 'com.github.ctiao:ndkbitmap-x86:0.9.21'
  180. }