build.gradle 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.greenrobot.greendao'
  3. android {
  4. compileSdkVersion rootProject.ext.compileSdkVersion
  5. buildToolsVersion rootProject.ext.buildToolsVersion
  6. defaultConfig {
  7. applicationId "com.timichat.app"
  8. minSdkVersion rootProject.ext.minSdkVersion
  9. targetSdkVersion rootProject.ext.targetSdkVersion
  10. versionCode 202112250
  11. versionName "2.4.0"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. multiDexEnabled true
  14. buildConfigField("String", "FILE_PROVIDER_NAME", "\"com.timichat.app.FileProvider\"")
  15. manifestPlaceholders = [
  16. app_Id : "com.timichat.app",
  17. app_name : "TiMi语音",
  18. channel_id : "3",
  19. qq_app_id : "",
  20. map_api_key : "fd732c3845297b3e1dd744a8b425ec3f",
  21. ali_app_key : "32000822",
  22. ali_app_secret: "7abc4d3022947c40dae14977be97b041"
  23. ]
  24. ndk {
  25. abiFilters 'armeabi-v7a'/*, 'arm64-v8a'*/
  26. }
  27. }
  28. dexOptions {
  29. javaMaxHeapSize "4g"
  30. }
  31. greendao {
  32. schemaVersion 23
  33. daoPackage 'com.starbuds.app.entity.db'
  34. targetGenDir 'src/main/java'
  35. }
  36. signingConfigs {
  37. release {
  38. storeFile file('../boluojie.keystore')
  39. storePassword "boluojie.china.com"
  40. keyAlias "boluojie"
  41. keyPassword "boluojie.china.com"
  42. v1SigningEnabled true
  43. v2SigningEnabled true
  44. }
  45. }
  46. buildTypes {
  47. debug {
  48. debuggable true
  49. minifyEnabled false
  50. shrinkResources false
  51. zipAlignEnabled true
  52. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  53. manifestPlaceholders = [
  54. ali_app_key : "333347698",
  55. ali_app_secret: "127635475506424ca142289274a0592e",
  56. channel_id : "201"
  57. ]
  58. signingConfig signingConfigs.release
  59. }
  60. release {
  61. minifyEnabled true
  62. shrinkResources true
  63. zipAlignEnabled true
  64. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  65. }
  66. }
  67. flavorDimensions "xingya"
  68. //多渠道打包配置
  69. productFlavors {
  70. //渠道包
  71. timi {// timi
  72. dimension "xingya"
  73. signingConfig signingConfigs.release
  74. manifestPlaceholders = [
  75. app_Id : "com.timichat.app",
  76. app_name : "TiMi语音",
  77. channel_id : "261442100002816"
  78. ]
  79. }
  80. tm {
  81. dimension "xingya"
  82. signingConfig signingConfigs.release
  83. manifestPlaceholders = [
  84. app_Id : "com.timichat.app",
  85. app_name : "Tm语音",
  86. channel_id : "261442100002816"
  87. ]
  88. }
  89. }
  90. android.applicationVariants.all { variant ->
  91. variant.outputs.all { output ->
  92. def outputFile = output.outputFile
  93. if (outputFile != null && outputFile.name.contains('release')) {
  94. //渠道名称
  95. def buildName = ""
  96. variant.productFlavors.each { product ->
  97. buildName = product.name
  98. }
  99. //获取每个打包产物
  100. variant.getPackageApplication().outputDirectory = new File("${project.getProjectDir()}/channel")
  101. outputFileName = "${buildName}-${variant.versionName}-${variant.versionCode}.apk"
  102. }
  103. }
  104. }
  105. sourceSets {
  106. [timi,tm].each {
  107. sourceSets[it.name].res.srcDirs = ["src/channel/${it.name}/res"]
  108. sourceSets[it.name].assets.srcDirs = ["src/channel/${it.name}/assets"]
  109. }
  110. }
  111. lintOptions {
  112. abortOnError false
  113. }
  114. compileOptions {
  115. sourceCompatibility JavaVersion.VERSION_1_8
  116. targetCompatibility JavaVersion.VERSION_1_8
  117. }
  118. }
  119. dependencies {
  120. implementation fileTree(include: ['*.jar'], dir: 'libs')
  121. implementation fileTree(include: ['*.aar'], dir: 'libs')
  122. implementation project(':xlibrary')
  123. // implementation project(':tuikit')
  124. implementation project(':easyPhotos')
  125. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
  126. implementation "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
  127. implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.androidxConstraintVersion"
  128. implementation "androidx.appcompat:appcompat:$rootProject.ext.androidxVersion"
  129. annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
  130. implementation "org.greenrobot:greendao:$rootProject.ext.greendaoVersion"
  131. implementation("com.github.yuweiguocn:GreenDaoUpgradeHelper:v$rootProject.ext.greendaoHelperVersion") {
  132. exclude module: 'support-annotations'
  133. }
  134. // implementation "com.android.support.constraint:constraint-layout:$rootProject.ext.constraintLayoutVersion"
  135. implementation 'com.qiniu:qiniu-android-sdk:7.3.12'
  136. implementation 'com.hyman:flowlayout-lib:1.1.2'
  137. implementation 'androidx.multidex:multidex:2.0.0'
  138. implementation 'com.github.hackware1993:MagicIndicator:1.5.0'
  139. implementation 'com.contrarywind:Android-PickerView:3.2.6'
  140. implementation 'me.jessyan:autosize:1.1.2'
  141. implementation 'cn.bingoogolapple:bga-qrcodecore:1.1.7@aar'
  142. implementation 'cn.bingoogolapple:bga-zxing:1.1.7@aar'
  143. implementation 'com.bigkoo:convenientbanner:2.0.5'
  144. implementation 'com.shizhefei:MultiTypeView:1.0.1'
  145. implementation files('libs/SecurityLib.jar')
  146. implementation('com.github.Yellow5A5:ClearScreenHelper:1.0.2') {
  147. exclude group: 'com.android.support'
  148. }
  149. implementation 'cn.jzvd:jiaozivideoplayer:7.4.0'
  150. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
  151. implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
  152. // 微信
  153. implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.5.8'
  154. // 华为支付
  155. // implementation 'com.huawei.android.hms:iap:2.6.3.306'
  156. // implementation 'com.huawei.android.hms:hwid::2.6.3.306'
  157. // implementation 'com.huawei.android.hms:push:2.6.3.306'
  158. // QQ
  159. implementation files('libs/open_sdk_r08e585d_lite.jar')
  160. // 图片压缩
  161. implementation 'top.zibin:Luban:1.1.8'
  162. // 图片裁剪
  163. implementation 'com.github.yalantis:ucrop:2.2.3'
  164. implementation 'com.github.yalantis:ucrop:2.2.3-native'
  165. // 高德定位
  166. implementation 'com.amap.api:location:4.8.0'
  167. implementation ("com.github.bumptech.glide:glide:$rootProject.ext.glideVersion") {
  168. exclude group: "com.android.support"
  169. }
  170. implementation "com.github.bumptech.glide:okhttp3-integration:$rootProject.ext.glideVersion"
  171. implementation "com.github.bumptech.glide:annotations:$rootProject.ext.glideVersion"
  172. annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.ext.glideVersion"
  173. implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.12.0'
  174. // implementation "androidx.vectordrawable:vectordrawable-animated:1.1.0"
  175. // implementation "androidx.exifinterface:exifinterface:1.2.0"
  176. implementation 'jp.wasabeef:glide-transformations:4.1.0'
  177. implementation 'com.tencent.bugly:crashreport:3.1.0@aar'
  178. implementation 'com.tencent.bugly:nativecrashreport:3.7.1@aar'
  179. implementation 'com.airbnb.android:lottie:3.5.0'
  180. implementation 'com.github.yyued:SVGAPlayer-Android:2.5.14'
  181. implementation "io.github.tencent:vap:2.0.20"
  182. // implementation 'com.github.YvesCheung:SVGAGlidePlugin:4.9.3'
  183. implementation 'com.imuxuan:floatingview:1.6'
  184. testImplementation 'junit:junit:4.12'
  185. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  186. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  187. implementation 'com.github.yujinzhao123:DoubleHeadedDragonBar:1.0.4'
  188. implementation 'com.hyman:flowlayout-lib:1.1.2'
  189. implementation 'com.github.cirno-poi:VerifyEditText:1.0.0'
  190. implementation 'com.aliyun.ams:alicloud-android-push:3.1.12'
  191. // implementation 'com.aliyun.ams:alicloud-android-third-push:3.1.0@aar'
  192. // implementation 'com.aliyun.ams:huawei-push:2.6.3.305'
  193. // implementation 'com.aliyun.ams:huawei-push-base:2.6.3.305'
  194. // implementation 'com.aliyun.ams:meizu-push:3.8.7.1'
  195. // implementation 'com.aliyun.ams:third_vivopush:2.9.0.1'
  196. implementation 'com.umeng.umsdk:common:9.4.0'// 必选
  197. implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
  198. implementation 'com.umeng.umsdk:apm:1.3.1' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
  199. implementation 'cn.rongcloud.sdk:im_lib:4.0.3.13'
  200. implementation ('cn.rongcloud.sdk:im_kit:4.0.3.13'){
  201. exclude group: "androidx.media"
  202. exclude group: "androidx.legacy"
  203. // exclude group: "com.github.bumptech.glide"
  204. }
  205. // implementation ('cn.rongcloud.sdk:im_kit:5.1.0'){
  206. // exclude group: "com.github.bumptech.glide"
  207. // }
  208. // implementation 'io.agora.rtc:agora-rtc-sdk:1.0.0'
  209. implementation 'com.github.zegolibrary:express-audio:2.10.0'
  210. implementation 'com.google.android:flexbox:2.0.1'
  211. implementation 'com.tencent:mmkv-static:1.2.10'
  212. implementation 'com.github.MZCretin:ExpandableTextView:1.6.1-x'
  213. // implementation 'com.tencent.tbs.tbssdk:sdk:43939'
  214. implementation 'com.github.lzyzsd:jsbridge:1.0.4'
  215. // implementation 'com.github.wendux:DSBridge-Android:3.0-SNAPSHOT'
  216. // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
  217. }