贷款超市新仓库

build.gradle 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. apply plugin: 'com.android.application'
  2. //apply plugin: 'io.fabric'
  3. repositories {
  4. mavenCentral()
  5. mavenLocal()
  6. flatDir {
  7. dirs 'libs'
  8. }
  9. }
  10. def bakPath = file("${buildDir}/bakApk/")
  11. android {
  12. compileSdkVersion 28
  13. defaultConfig {
  14. applicationId "com.smileflowpig.money"
  15. minSdkVersion 19
  16. targetSdkVersion 28
  17. versionCode 15
  18. versionName "2.2.2"
  19. multiDexEnabled true
  20. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  21. }
  22. //签名
  23. signingConfigs {
  24. myConfig {
  25. storeFile file("bangnidai.jks") //签名文件
  26. storePassword "bangnidai123"
  27. keyAlias "bangnidai"
  28. keyPassword "bangnidai123" //签名密码
  29. }
  30. }
  31. buildTypes {
  32. release {
  33. signingConfig signingConfigs.myConfig
  34. multiDexEnabled true
  35. minifyEnabled false
  36. proguardFiles 'proguard-rules.pro'
  37. applicationVariants.all { variant ->
  38. // 更新至Android Studio 3.3 gradle 4.10.1
  39. variant.outputs.all {
  40. outputFileName = "xiaohuazhu_${variant.flavorName}_${variant.versionCode}-${variant.versionName}-${releaseTime()}.apk"
  41. }
  42. // variant.outputs.each { output ->
  43. // if (output.outputFile != null && output.outputFile.name.endsWith('.apk')
  44. // && 'release'.equals(variant.buildType.name)) {
  45. // def apkFile = new File(
  46. // output.outputFile.getParent(),
  47. // "xiaohuazhu${variant.flavorName}_v${variant.versionName}_${releaseTime()}.apk")
  48. // output.outputFile = apkFile
  49. // }
  50. // }
  51. // }
  52. }
  53. }
  54. debug {
  55. signingConfig signingConfigs.myConfig
  56. minifyEnabled false
  57. multiDexEnabled true
  58. proguardFiles 'proguard-rules.pro'
  59. }
  60. }
  61. flavorDimensions "default"
  62. productFlavors {
  63. aoppo {
  64. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1006"]
  65. buildConfigField 'String', 'CHANNLE', '"1006"'
  66. }
  67. a360 {
  68. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1002"]
  69. buildConfigField 'String', 'CHANNLE', '"1002"'
  70. }
  71. ayingyongbao {
  72. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1001"]
  73. buildConfigField 'String', 'CHANNLE', '"1001"'
  74. }
  75. axiaomi {
  76. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1004"]
  77. buildConfigField 'String', 'CHANNLE', '"1004"'
  78. }
  79. ahuawei {
  80. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1005"]
  81. buildConfigField 'String', 'CHANNLE', '"1005"'
  82. }
  83. ameizu {
  84. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1007"]
  85. buildConfigField 'String', 'CHANNLE', '"1007"'
  86. }
  87. avivo {
  88. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1003"]
  89. buildConfigField 'String', 'CHANNLE', '"1003"'
  90. }
  91. search360 {
  92. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "4001"]
  93. buildConfigField 'String', 'CHANNLE', '"4001"'
  94. }
  95. smss01 {
  96. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40002"]
  97. buildConfigField 'String', 'CHANNLE', '"40002"'
  98. }
  99. smss02 {
  100. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40003"]
  101. buildConfigField 'String', 'CHANNLE', '"40003"'
  102. }
  103. smss03 {
  104. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40004"]
  105. buildConfigField 'String', 'CHANNLE', '"40004"'
  106. }
  107. smss07 {
  108. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40005"]
  109. buildConfigField 'String', 'CHANNLE', '"40005"'
  110. }
  111. smss08 {
  112. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40006"]
  113. buildConfigField 'String', 'CHANNLE', '"40006"'
  114. }
  115. smss09 {
  116. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40007"]
  117. buildConfigField 'String', 'CHANNLE', '"40007"'
  118. }
  119. smss10 {
  120. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40008"]
  121. buildConfigField 'String', 'CHANNLE', '"40008"'
  122. }
  123. smss11 {
  124. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40009"]
  125. buildConfigField 'String', 'CHANNLE', '"40009"'
  126. }
  127. smss13 {
  128. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40025"]
  129. buildConfigField 'String', 'CHANNLE', '"40025"'
  130. }
  131. aqy01 {
  132. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40013"]
  133. buildConfigField 'String', 'CHANNLE', '"40013"'
  134. }
  135. aqy02 {
  136. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40014"]
  137. buildConfigField 'String', 'CHANNLE', '"40014"'
  138. }
  139. aqy03 {
  140. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40015"]
  141. buildConfigField 'String', 'CHANNLE', '"40015"'
  142. }
  143. aqy04 {
  144. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40016"]
  145. buildConfigField 'String', 'CHANNLE', '"40016"'
  146. }
  147. tuiguan {
  148. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40085"]
  149. buildConfigField 'String', 'CHANNLE', '"40085"'
  150. }
  151. }
  152. }
  153. def releaseTime() {
  154. return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
  155. }
  156. dependencies {
  157. implementation fileTree(include: ['*.jar'], dir: 'libs')
  158. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  159. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  160. // compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
  161. // transitive = true;
  162. // }
  163. implementation(name: 'base', ext: 'aar')
  164. // compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
  165. // compile "com.android.support:recyclerview-v7:$rootProject.ext.supportVersi
  166. // on"
  167. // compile "com.android.support:design:$rootProject.ext.supportVersion"
  168. implementation "net.qiujuer.genius:ui:$rootProject.ext.geniusVersion"
  169. implementation "net.qiujuer.genius:res:$rootProject.ext.geniusVersion"
  170. implementation "de.hdodenhof:circleimageview:$rootProject.ext.circleimageviewVersion"
  171. implementation 'com.github.bumptech.glide:glide:3.7.0'
  172. implementation "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
  173. annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
  174. implementation "pub.devrel:easypermissions:$rootProject.ext.easyPMVersion"
  175. // 空气面板
  176. implementation "net.qiujuer.widget:airpanel:$rootProject.ext.airpanelVersion"
  177. implementation project(':common')
  178. implementation project(':lang')
  179. implementation project(':factory')
  180. implementation project(':PhotoPicker')
  181. implementation 'com.liulishuo.filedownloader:library:1.6.5'
  182. implementation 'org.jsoup:jsoup:1.9.2'
  183. implementation 'com.lovedise:permissiongen:0.0.6'
  184. implementation 'q.rorbin:badgeview:1.1.2'
  185. implementation 'com.youth.banner:banner:1.4.9'
  186. implementation 'com.github.addappcn:android-pickers:1.0.3'
  187. implementation 'com.contrarywind:Android-PickerView:4.1.6'
  188. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  189. // compile 'com.android.support:support-v4:25.+'
  190. implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
  191. implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'
  192. implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.1'
  193. implementation 'org.greenrobot:eventbus:3.0.0'
  194. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
  195. testImplementation 'junit:junit:4.12'
  196. implementation 'com.github.lsjwzh.RecyclerViewPager:lib:v1.1.2'
  197. implementation 'com.github.mcxtzhang:SuspensionIndexBar:V1.0.0'
  198. implementation 'com.squareup.retrofit2:retrofit:2.3.0'
  199. implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
  200. implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
  201. implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
  202. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  203. implementation 'com.zhy:autolayout:1.4.5'
  204. implementation 'com.xhb:xbanner:1.4.1'
  205. implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
  206. implementation 'com.contrarywind:Android-PickerView:4.1.6'
  207. implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
  208. implementation 'com.amap.api:location:latest.integration'
  209. implementation 'me.yokeyword:indexablerecyclerview:1.3.0'
  210. implementation 'com.umeng.umsdk:analytics:latest.integration'
  211. implementation 'com.umeng.umsdk:common:latest.integration'
  212. implementation 'com.android.support:cardview-v7:25.2.0'
  213. implementation files('libs/umeng-share-wechat-simplify-6.9.3.jar')
  214. implementation files('libs/MiPush_SDK_Client_3_6_9.jar')
  215. implementation 'com.huawei.android.hms:push:2.6.1.301'
  216. implementation 'com.huawei.android.hms:hwid:2.6.1.301'
  217. implementation files('libs/vivo_pushsdk_v2.3.1.jar')
  218. implementation 'com.alibaba:fastjson:1.2.54'
  219. implementation 'com.alibaba:fastjson:1.1.70.android'
  220. implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
  221. implementation project(':ocr_ui')
  222. implementation 'com.android.support:multidex:1.0.1'
  223. // 基础依赖包,必须要依赖
  224. implementation 'com.gyf.immersionbar:immersionbar:3.0.0-beta05'
  225. // fragment快速实现(可选)
  226. implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0-beta05'
  227. }
  228. def product_name = "bangnidai_v" + android.defaultConfig.versionName
  229. def time = "1367"
  230. task initTimeScape << {
  231. println "first time"
  232. println "$time"
  233. def gCalendar = new GregorianCalendar()
  234. time = gCalendar.time.format("MMddHHmm")
  235. println "second time"
  236. println "$time"
  237. }
  238. task initReleaseApkProduct_name(dependsOn: ['initTimeScape']) << {
  239. //初始化release包名
  240. product_name = product_name + "_" + time + "R.apk"
  241. def outputName = "_OUT:>PRODUCT_FILENAME=" + product_name + ";_"
  242. println "$outputName"
  243. }
  244. task initDebugApkProduct_name(dependsOn: ['initTimeScape']) << { //初始化release包名
  245. product_name = product_name + "_" + time + "D.apk"
  246. def outputName = "_OUT:>PRODUCT_FILENAME=" + product_name + ";_"
  247. println "$outputName"
  248. }
  249. task release(dependsOn: ['assembleRelease', 'initReleaseApkProduct_name']) << {
  250. copy {
  251. from('build/outputs/apk') {
  252. include('**/*-release.apk')
  253. rename '(.*)-release.apk', product_name
  254. }
  255. from('build/proguard/release') {
  256. include('**/mapping.txt')
  257. rename '(.*).txt', product_name + ".map"
  258. }
  259. into('products')
  260. }
  261. }
  262. task debug(dependsOn: ['assembleDebug', 'initDebugApkProduct_name']) << {
  263. copy {
  264. from('build/outputs/apk') {
  265. include('**/*.apk')
  266. rename '(.*).apk', product_name
  267. }
  268. into('products')
  269. }
  270. }