build.gradle 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. android {
  6. namespace 'com.yihucha.hbyhc'
  7. compileSdk 33
  8. defaultConfig {
  9. applicationId "com.yihucha.hbyhc"
  10. minSdk 21
  11. targetSdk 33
  12. versionCode 1
  13. versionName "1.0"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. //必须要保证所有的flavor 都属于同一个维度
  16. flavorDimensions "default"
  17. ndk {
  18. //选择要添加的对应cpu类型的.so库。
  19. //热修复支持五种
  20. abiFilters 'arm64-v8a', 'armeabi', 'armeabi-v7a', 'x86', 'x86_64'
  21. }
  22. }
  23. buildTypes {
  24. release {
  25. minifyEnabled false
  26. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  27. }
  28. }
  29. compileOptions {
  30. sourceCompatibility JavaVersion.VERSION_1_8
  31. targetCompatibility JavaVersion.VERSION_1_8
  32. }
  33. viewBinding {
  34. enabled = true;
  35. }
  36. dependenciesInfo {
  37. includeInBundle false
  38. includeInApk false
  39. }
  40. //优化二
  41. productFlavors {
  42. Tencent {
  43. }
  44. Huawei {
  45. }
  46. Xiaomi {
  47. }
  48. Oppo {
  49. }
  50. VIVO {
  51. }
  52. Baidu {
  53. }
  54. Chan360 {
  55. }
  56. Dog {
  57. }
  58. Al {
  59. }
  60. PP {
  61. }
  62. UC {
  63. }
  64. Wandoujia {
  65. }
  66. }
  67. productFlavors.all { flavor ->
  68. flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
  69. }
  70. applicationVariants.all { variant ->
  71. variant.outputs.all { output ->
  72. def outputFile = output.outputFile
  73. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  74. //打包的apk包名变为了
  75. //app-具体的渠道名-release-1.0.apk
  76. // def fileName = outputFile.name.replace(".apk", ".apk")
  77. // outputFileName = fileName
  78. //Cxb_xiaomi_20200808_V3.0.0.apk
  79. def fileName = outputFile.name.replace("app-", "").replace("-release.apk", "");
  80. outputFileName = "Cxb_" + fileName + "_" + new Date().format("yyyyMMdd") + "_V" + defaultConfig.versionName + ".apk"
  81. }
  82. }
  83. }
  84. signingConfigs {
  85. debug {
  86. storeFile file('chuxubao.keystore')
  87. storePassword "tdba123"
  88. keyAlias "chuxubao"
  89. keyPassword "tdba123"
  90. }
  91. }
  92. }
  93. dependencies {
  94. configurations {
  95. all {
  96. exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
  97. }
  98. }
  99. implementation 'androidx.appcompat:appcompat:1.4.1'
  100. implementation 'com.google.android.material:material:1.5.0'
  101. implementation project(path: ':easyPhotos')
  102. testImplementation 'junit:junit:4.13.2'
  103. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  104. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  105. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  106. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
  107. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
  108. implementation 'androidx.navigation:navigation-fragment:2.3.5'
  109. implementation 'androidx.navigation:navigation-ui:2.3.5'
  110. implementation 'org.chromium.net:cronet-api:76.3809.111'
  111. implementation(fileTree("libs"));
  112. //图片加载框架
  113. //Glide
  114. // https://github.com/bumptech/glide
  115. api 'com.github.bumptech.glide:glide:4.12.0'
  116. annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  117. //Glide 用到的 BitmapTransformation
  118. //https://github.com/wasabeef/glide-transformations
  119. api 'jp.wasabeef:glide-transformations:4.3.0'
  120. //微信
  121. // api 'com.tencent.mm.opensdk:wechat-sdk-android:+'
  122. api 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
  123. //屏幕适配
  124. implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
  125. //网络请求
  126. //retrofit2
  127. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  128. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  129. //日志拦截器
  130. implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
  131. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
  132. //rxjava
  133. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  134. implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
  135. //gson
  136. implementation 'com.google.code.gson:gson:2.8.7'
  137. //腾讯MMKV
  138. implementation 'com.tencent:mmkv:1.2.11'
  139. //轮播图
  140. implementation 'io.github.youth5201314:banner:2.2.2'
  141. //刷新
  142. implementation 'com.lcodecorex:tkrefreshlayout:1.0.7'
  143. //AndroidUtilCode
  144. implementation 'com.blankj:utilcodex:1.31.0'
  145. //状态栏
  146. // After AndroidX
  147. implementation('com.github.niorgai:StatusBarCompat:2.3.3', {
  148. exclude group: 'androidx.appcompat:appcompat'
  149. exclude group: 'com.google.android.material:material'
  150. })
  151. //适配器
  152. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
  153. //搜索历史
  154. // implementation 'com.hyman:flowlayout-lib:1.1.2'
  155. implementation project(':flowlayout-lib')
  156. //json
  157. implementation 'com.alibaba:fastjson:1.1.54.android'
  158. //视频播放 https://www.jianshu.com/p/8f1af9790c69
  159. implementation 'cn.jzvd:jiaozivideoplayer:6.2.12'
  160. //瀑布流LayoutManager
  161. implementation 'com.google.android.flexbox:flexbox:3.0.0'
  162. //okhttp网络下载
  163. implementation 'com.squareup.okhttp3:okhttp:3.14.7'
  164. //地址联动
  165. implementation 'com.github.gamekonglee:regionSelector:2.0'
  166. //dialog
  167. implementation 'com.github.liys666666:LDialog:V2.1.2'
  168. //事件传递
  169. implementation 'org.greenrobot:eventbus:3.0.0'
  170. //照相图片选择
  171. // implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.5' //androidx版本,支持android 10、11,永久维护
  172. //滑动选择器
  173. // implementation 'com.contrarywind:wheelview:4.1.0'
  174. //时间选择器
  175. implementation 'com.contrarywind:Android-PickerView:4.1.9'
  176. //评分
  177. implementation 'com.github.KaelLi1989:NiceRatingBar:1.0.0'
  178. //图片压缩
  179. // implementation 'com.github.ZS-ZhangsShun:EasyImageCompressor:1.0.7'
  180. //支付宝
  181. api 'com.alipay.sdk:alipaysdk-android:+@aar'
  182. //权限申请
  183. implementation 'com.yanzhenjie:permission:2.0.3' //添加依赖
  184. //版本更新
  185. //----------AndroidX 版本
  186. //app-updater
  187. implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.3'
  188. //app-dialog
  189. implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.1.3'
  190. // For Java
  191. implementation 'androidx.work:work-runtime:2.7.1'
  192. //二维码
  193. implementation 'com.google.zxing:core:3.3.0'
  194. //类似酒店入驻时间选择器
  195. // implementation 'com.github.atuan07:CustomHotelCalender:V1.0.2'
  196. //日历选择开始和结束时间
  197. implementation 'com.github.TurnTears:CalendarRangeSelect:1.1.1'
  198. //京东联盟
  199. api project(':jd_sdk_lib')
  200. //穿山甲
  201. implementation 'com.pangle.cn:ads-sdk-pro:4.4.0.9'
  202. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  203. implementation 'com.umeng.umsdk:common:9.5.2'// (必选)
  204. implementation 'com.umeng.umsdk:asms:1.6.3'// 必选
  205. implementation 'com.umeng.umsdk:abtest:1.0.1'//使用U-App中ABTest能力,可选
  206. implementation 'com.umeng.umsdk:apm:1.7.0'// U-APM产品包依赖(必选)
  207. //友盟Push依赖
  208. api 'com.umeng.umsdk:push:6.5.4'
  209. implementation 'com.umeng.umsdk:share-core:7.2.1'//分享核心库,必选
  210. implementation 'com.umeng.umsdk:share-board:7.2.1'//分享面板功能,可选
  211. implementation 'com.umeng.umsdk:share-wx:7.2.1'//微信完整版
  212. implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.8.0'//微信官方依赖库,必选
  213. //Android数据库LitePal
  214. implementation 'org.litepal.android:java:3.0.0'
  215. //WebViewJavascriptBridge实现JS与java安全交互
  216. implementation 'com.github.lzyzsd:jsbridge:1.0.4'
  217. //文字轮播
  218. implementation 'com.sunfusheng:marqueeview:1.3.3'
  219. //毕加索图片加载
  220. implementation 'com.squareup.picasso:picasso:2.8'
  221. //解析html代码
  222. implementation 'org.jsoup:jsoup:1.9.2'
  223. //BASE加密
  224. implementation "commons-codec:commons-codec:1.10"
  225. //MaterialButton
  226. implementation 'com.google.android.material:material:1.2.1'
  227. //加载gif
  228. implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
  229. //wheelview
  230. // implementation 'com.contrarywind:Android-WheelView:1.1.8'
  231. implementation('com.fasterxml.jackson.core:jackson-core:2.11.1')
  232. implementation('com.fasterxml.jackson.core:jackson-annotations:2.11.1')
  233. implementation('com.fasterxml.jackson.core:jackson-databind:2.11.1')
  234. //zxing 二维码扫描
  235. implementation 'com.journeyapps:zxing-android-embedded:3.5.0'
  236. }