build.gradle 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. ext.mainApp = true //设置为true,表示此module为主app module,一直以application方式编译
  2. apply from: rootProject.file('cc-settings.gradle')
  3. apply from: rootProject.file('common-build.gradle')
  4. android {
  5. compileSdkVersion rootProject.compile_sdk_version
  6. defaultConfig {
  7. applicationId rootProject.application_id
  8. minSdkVersion rootProject.min_sdk_version
  9. targetSdkVersion rootProject.target_sdk_version
  10. versionCode rootProject.application_version_code
  11. versionName rootProject.application_version_name
  12. manifestPlaceholders = [
  13. JPUSH_PKGNAME: 'com.quansu.creativity',
  14. JPUSH_APPKEY : "315cad416dd39b8a8e2b5a92",//值来自开发者平台取得的AppKey
  15. JPUSH_CHANNEL: "default_developer",
  16. ]
  17. ndk {
  18. //选择要添加的对应 cpu 类型的 .so 库。
  19. // abiFilters "armeabi","armeabi-v7a","arm64-v8a","x86"
  20. abiFilters 'armeabi-v7a'
  21. // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  22. }
  23. }
  24. signingConfigs {
  25. release {
  26. keyAlias "xianglian"
  27. keyPassword "xianglian@###121"
  28. storeFile file("../xianglian.jks")
  29. storePassword "xianglian@###121"
  30. v2SigningEnabled true
  31. }
  32. }
  33. buildTypes {
  34. debug {
  35. signingConfig signingConfigs.release
  36. versionNameSuffix "-" + name
  37. }
  38. release {
  39. debuggable false
  40. minifyEnabled true
  41. zipAlignEnabled true
  42. shrinkResources true
  43. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  44. signingConfig signingConfigs.release
  45. }
  46. }
  47. repositories{
  48. flatDir {
  49. dirs 'libs'
  50. }
  51. }
  52. //指定release APK名称
  53. applicationVariants.all { variant ->
  54. variant.outputs.all {
  55. // 输出apk名称为 1.0_vivo.apk
  56. def fileName = "${variant.productFlavors[0].name}_${defaultConfig.versionName}.apk"
  57. outputFileName = fileName
  58. }
  59. }
  60. flavorDimensions "version"
  61. //指定渠道
  62. productFlavors {
  63. dev {}
  64. vivo {}
  65. oppo {}
  66. huawei {}
  67. xiaomi {}
  68. coolapk {}
  69. yingyongbao {}
  70. }
  71. // 批量渠道包值替换
  72. //通过脚本获取所有渠道
  73. //在Terminal控制台输入gradlew assembleRelease开始打包
  74. //包生成在build-->outputs-->apk文件夹
  75. productFlavors.all {
  76. // 遍历替换所有渠道
  77. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL: name]
  78. }
  79. //
  80. //Terminal窗口输入
  81. //打包wandoujia渠道的release版本,执行如下命令
  82. // gradlew assembleWandoujiaRelease
  83. //打包wandoujia渠道的debug版本,执行如下命令
  84. // gradlew assembleWandoujiaDebug
  85. // 只打wandoujia渠道版会生成wandoujia渠道的Release和Debug版本
  86. // gradlew assembleWandoujia
  87. //打全部Release版本
  88. // gradlew assembleRelease
  89. compileOptions {
  90. targetCompatibility 1.8
  91. sourceCompatibility 1.8
  92. }
  93. kotlinOptions {
  94. jvmTarget = '1.8'
  95. }
  96. android.buildFeatures {
  97. dataBinding = true
  98. viewBinding = false
  99. }
  100. }
  101. dependencies {
  102. implementation project(':base')
  103. implementation project(path: ':update')
  104. // implementation project(path: ':alipay')
  105. // addComponent 'umeng'
  106. // addComponent 'jpush'
  107. // addComponent 'lookimg'
  108. //首页导航图
  109. implementation 'cn.bingoogolapple:bga-banner:2.2.6@aar'//首页导航图
  110. //微信sdk
  111. implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
  112. //侧滑删除
  113. // implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.2.5'
  114. //时间选择器
  115. implementation 'com.contrarywind:Android-PickerView:4.1.9'
  116. //选择图片
  117. implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0'
  118. //高仿微信朋友圈图片展示效果 ImageWatcher
  119. implementation 'com.github.iielse:ImageWatcher:2.1.2'
  120. // implementation 'cat.ereza:customactivityoncrash:2.3.0'
  121. //二维码扫描页面
  122. implementation 'cn.yipianfengye.android:zxing-library:2.2'
  123. implementation 'androidx.multidex:multidex:2.0.0'
  124. implementation 'com.github.bumptech.glide:glide:4.13.2'
  125. annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
  126. //阿里云金融级实名认证
  127. implementation files('libs/android-aliyunface-sdk-release-1.6.5-20220704102254.aar')
  128. implementation files('libs/android-aliyunbasicstl-sdk-release-1.6.5-20220704102254.aar')
  129. implementation files('libs/android-aliyuncomm-sdk-release-1.6.5-20220704102254.aar')
  130. implementation files('libs/android-aliyunocr-sdk-release-1.6.5-20220704102254.aar')
  131. implementation files('libs/photinus-1.0.1.220217162928.aar')
  132. implementation files('libs/Android-AliyunDevice-FG-10022.2.aar')
  133. implementation files('libs/APSecuritySDK-DeepSec-7.0.1.20220617.jiagu.aar')
  134. implementation files('libs/tygerservice-1.0.0.220618105311.aar')
  135. implementation 'com.squareup.okhttp3:okhttp:4.10.0'
  136. implementation 'com.squareup.okio:okio:1.14.0'
  137. implementation 'com.alibaba:fastjson:1.2.62'
  138. implementation 'com.aliyun.dpa:oss-android-sdk:+'
  139. testImplementation 'junit:junit:4.+'
  140. // //视频
  141. // implementation 'com.github.JarvanMo:ExoVideoView:2.1.6'
  142. // implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.3.4-release-jitpack'
  143. implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.3.4-release-jitpack'
  144. implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v8.3.4-release-jitpack'
  145. //支付宝
  146. implementation 'com.alipay.sdk:alipaysdk-android:+@aar'
  147. //为了使用 EncodingUtils 在高版本已过时
  148. implementation 'org.apache.httpcomponents:httpcore:4.4.4'
  149. }