build.gradle 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 21
  13. targetSdkVersion 30
  14. versionCode 7
  15. versionName "1.7"
  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. productFlavors.all {
  98. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  99. }
  100. compileOptions {
  101. sourceCompatibility JavaVersion.VERSION_1_8
  102. targetCompatibility JavaVersion.VERSION_1_8
  103. }
  104. aaptOptions {
  105. additionalParameters =["--warn-manifest-validation"]
  106. }
  107. }
  108. dependencies {
  109. implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  110. implementation 'androidx.appcompat:appcompat:1.0.0'
  111. implementation 'com.github.bumptech.glide:glide:4.12.0'
  112. annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  113. implementation 'jp.wasabeef:glide-transformations:4.3.0'
  114. implementation('com.zhousf.lib:okhttp3:2.9.9') {
  115. exclude(module: 'support-annotations')
  116. exclude(module: 'gson')
  117. }
  118. //gson
  119. implementation 'com.google.code.gson:gson:2.8.9'
  120. //logger
  121. implementation 'com.orhanobut:logger:2.2.0'
  122. //mmkv
  123. implementation 'com.tencent:mmkv:1.2.11'
  124. implementation 'com.uber.autodispose2:autodispose:2.0.0'
  125. implementation 'com.uber.autodispose2:autodispose-android:2.0.0'
  126. implementation 'com.uber.autodispose2:autodispose-lifecycle:2.0.0'
  127. implementation 'com.uber.autodispose2:autodispose-androidx-lifecycle:2.0.0'
  128. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  129. implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
  130. implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
  131. // required, enough for most devices.
  132. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
  133. // ExoPlayer as IMediaPlayer: optional, experimental
  134. implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
  135. //JZ播放器
  136. implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
  137. //recyclerview
  138. implementation 'androidx.recyclerview:recyclerview:1.1.0'
  139. //驰声
  140. implementation 'io.github.ChivoxSupport:vox-sdk:2.2.23+2.0.8.1'
  141. //rxBind
  142. implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
  143. implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
  144. implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
  145. implementation "androidx.constraintlayout:constraintlayout:2.1.1"
  146. // To use constraintlayout in compose
  147. implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01"
  148. //解除Android P 反射机制
  149. implementation 'com.github.tiann:FreeReflection:3.1.0'
  150. //百度(小度音响SDK)
  151. implementation 'com.baidu.duer.botsdk:bot-sdk-android:1.56.1'
  152. // 3rd Party
  153. implementation "com.alibaba:fastjson:${FASTJSON_VERSION}"
  154. //zxing
  155. implementation 'com.google.zxing:android-core:3.3.0'
  156. implementation 'com.google.zxing:core:3.3.2'
  157. implementation files('libs/gcs-authservice-1.0.0.21.jar')
  158. implementation files('libs/registry-api-1.1.16-20201203.085134-3.jar')
  159. implementation files('libs/aranger.jar')
  160. }