build.gradle 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. buildToolsVersion "30.0.3"
  10. defaultConfig {
  11. applicationId "com.edufound.reader"
  12. minSdkVersion 26
  13. targetSdkVersion 30
  14. versionCode 20
  15. versionName "2.0"
  16. flavorDimensions "versionCode"
  17. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
  18. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  19. ndk {
  20. abiFilters "armeabi-v7a"
  21. }
  22. }
  23. signingConfigs {
  24. efunbox {
  25. keyAlias "edufound_key"
  26. keyPassword "edufound321"
  27. storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
  28. storePassword "edufound123"
  29. }
  30. }
  31. buildTypes {
  32. release {
  33. minifyEnabled false
  34. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  35. signingConfig signingConfigs.efunbox
  36. zipAlignEnabled true
  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.efunbox
  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. ]
  69. }
  70. }
  71. productFlavors {
  72. //义方
  73. channel_efunbox {
  74. signingConfig signingConfigs.efunbox
  75. manifestPlaceholders = [
  76. appCode: "3006",
  77. appIcon: "@drawable/icon",
  78. ]
  79. }
  80. //百度(小度音响)
  81. channel_baidu {
  82. signingConfig signingConfigs.efunbox
  83. manifestPlaceholders = [
  84. appCode: "3003",
  85. appIcon: "@drawable/icon",
  86. ]
  87. }
  88. //天猫精灵
  89. channel_tmail {
  90. signingConfig signingConfigs.efunbox
  91. manifestPlaceholders = [
  92. appCode: "3002",
  93. appIcon: "@drawable/icon",
  94. ]
  95. }
  96. //小爱音响
  97. channel_xayx {
  98. applicationIdSuffix ".xiaoai"
  99. signingConfig signingConfigs.efunbox
  100. manifestPlaceholders = [
  101. appCode: "2016",
  102. appIcon: "@drawable/icon",
  103. ]
  104. }
  105. }
  106. productFlavors.all {
  107. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  108. }
  109. compileOptions {
  110. sourceCompatibility JavaVersion.VERSION_1_8
  111. targetCompatibility JavaVersion.VERSION_1_8
  112. }
  113. aaptOptions {
  114. additionalParameters =["--warn-manifest-validation"]
  115. }
  116. }
  117. dependencies {
  118. implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  119. implementation 'androidx.appcompat:appcompat:1.0.0'
  120. implementation 'com.github.bumptech.glide:glide:4.12.0'
  121. annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  122. implementation 'jp.wasabeef:glide-transformations:4.3.0'
  123. implementation('com.zhousf.lib:okhttp3:2.9.9') {
  124. exclude(module: 'support-annotations')
  125. exclude(module: 'gson')
  126. }
  127. //gson
  128. implementation 'com.google.code.gson:gson:2.8.9'
  129. //logger
  130. implementation 'com.orhanobut:logger:2.2.0'
  131. //mmkv
  132. implementation 'com.tencent:mmkv:1.2.11'
  133. implementation 'com.uber.autodispose2:autodispose:2.0.0'
  134. implementation 'com.uber.autodispose2:autodispose-android:2.0.0'
  135. implementation 'com.uber.autodispose2:autodispose-lifecycle:2.0.0'
  136. implementation 'com.uber.autodispose2:autodispose-androidx-lifecycle:2.0.0'
  137. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  138. implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
  139. implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
  140. // required, enough for most devices.
  141. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
  142. // ExoPlayer as IMediaPlayer: optional, experimental
  143. implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
  144. //JZ播放器
  145. implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
  146. //recyclerview
  147. implementation 'androidx.recyclerview:recyclerview:1.1.0'
  148. //驰声
  149. implementation 'io.github.ChivoxSupport:vox-sdk:2.2.23+2.0.8.1'
  150. //rxBind
  151. implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
  152. implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
  153. implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
  154. implementation "androidx.constraintlayout:constraintlayout:2.1.1"
  155. // To use constraintlayout in compose
  156. implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01"
  157. //解除Android P 反射机制
  158. implementation 'com.github.tiann:FreeReflection:3.1.0'
  159. //百度(小度音响SDK)
  160. implementation 'com.baidu.duer.botsdk:bot-sdk-android:1.56.1'
  161. // 3rd Party
  162. implementation "com.alibaba:fastjson:${FASTJSON_VERSION}"
  163. //zxing
  164. implementation 'com.google.zxing:android-core:3.3.0'
  165. implementation 'com.google.zxing:core:3.3.2'
  166. implementation files('libs/gcs-authservice-1.0.0.21.jar')
  167. implementation files('libs/registry-api-1.1.16-20201203.085134-3.jar')
  168. implementation files('libs/aranger.jar')
  169. //小米音响
  170. implementation files('libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar')
  171. }