build.gradle 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.jakewharton.butterknife'
  3. apply plugin: 'org.greenrobot.greendao'
  4. //apply plugin: 'com.didi.virtualapk.host'
  5. android {
  6. compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int
  7. defaultConfig {
  8. applicationId "com.sheep.jiuyan.samllsheep"
  9. minSdkVersion ANDROID_MIN_SDK_VERSION as int
  10. targetSdkVersion ANDORID_TARGET_SDK_VERSION as int
  11. versionCode VERSION_CODE as int
  12. versionName VERSION_NAME
  13. multiDexEnabled true
  14. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  15. ndk {
  16. abiFilters "armeabi-v7a", "arm64-v8a"//, 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
  17. }
  18. // jackOptions {
  19. // enabled true
  20. // }
  21. flavorDimensions "versionCode"
  22. packagingOptions {
  23. exclude 'META-INF/proguard/androidx-annotations.pro'
  24. }
  25. }
  26. greendao {
  27. schemaVersion 21
  28. targetGenDir 'src/main/java'
  29. }
  30. signingConfigs {
  31. config {
  32. keyAlias 'sheep'
  33. keyPassword 'zhaoyi2004'
  34. storeFile file('../sign.jks')
  35. storePassword 'zhaoyi2004'
  36. v1SigningEnabled true
  37. v2SigningEnabled false
  38. }
  39. }
  40. lintOptions {
  41. abortOnError false
  42. disable 'MissingTranslation'
  43. }
  44. dexOptions {
  45. preDexLibraries = false
  46. javaMaxHeapSize "6g"
  47. }
  48. packagingOptions {
  49. exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
  50. exclude "**/module-info.class"
  51. exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'
  52. exclude 'META-INF/androidx.customview_customview.version'
  53. exclude 'META-INF/androidx.legacy_legacy-support-core-ui.version'
  54. exclude 'META-INF/androidx.drawerlayout_drawerlayout.version'
  55. exclude 'META-INF/androidx.interpolator_interpolator.version'
  56. exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
  57. exclude 'META-INF/androidx.slidingpanelayout_slidingpanelayout.version'
  58. exclude 'META-INF/androidx.appcompat_appcompat.version'
  59. exclude 'META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version'
  60. exclude 'META-INF/androidx.print_print.version'
  61. exclude 'META-INF/androidx.documentfile_documentfile.version'
  62. exclude 'META-INF/androidx.loader_loader.version'
  63. exclude 'META-INF/androidx.viewpager_viewpager.version'
  64. exclude 'META-INF/androidx.coordinatorlayout_coordinatorlayout.version'
  65. exclude 'META-INF/androidx.versionedparcelable_versionedparcelable.version'
  66. exclude 'META-INF/androidx.cursoradapter_cursoradapter.version'
  67. exclude 'META-INF/androidx.fragment_fragment.version'
  68. exclude 'META-INF/androidx.vectordrawable_vectordrawable.version'
  69. exclude 'META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version'
  70. exclude 'META-INF/androidx.core_core.version'
  71. exclude 'META-INF/androidx.vectordrawable_vectordrawable-animated.version'
  72. }
  73. buildTypes {
  74. release {
  75. minifyEnabled true
  76. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  77. signingConfig signingConfigs.config
  78. }
  79. debug {
  80. signingConfig signingConfigs.config
  81. }
  82. }
  83. productFlavors.all { flavor ->
  84. flavor.manifestPlaceholders = [DUANDUAN_GRAPH : "${flavor.name}",
  85. DUANDUAN_DATASHARE: "${flavor.name}",
  86. ]
  87. }
  88. productFlavors {
  89. developSheeptest {
  90. applicationId "com.sheep.jiuyan.samllsheep"
  91. manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptest",
  92. DUANDUAN_DATASHARE: "sheeptest",
  93. jpush_appkey : "627ffad0b1cdf701d15e027a",
  94. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  95. ]
  96. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"'
  97. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"'
  98. resValue "string", "app_name", "小绵羊测试"
  99. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  100. signingConfig signingConfigs.config
  101. }
  102. sheeptestjiguang {
  103. applicationId "com.sheep.jiuyan.samllsheep.test"
  104. manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptestjiguang",
  105. DUANDUAN_DATASHARE: "sheeptestjiguang",
  106. jpush_appkey : "627ffad0b1cdf701d15e027a",
  107. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  108. ]
  109. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptestjiguang"'
  110. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptestjiguang"'
  111. resValue "string", "app_name", "小绵羊极光测试"
  112. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  113. signingConfig signingConfigs.config
  114. }
  115. sheep {
  116. applicationId "com.sheep.jiuyan.samllsheep"
  117. manifestPlaceholders = [DUANDUAN_GRAPH : "sheep",
  118. DUANDUAN_DATASHARE: "sheep",
  119. jpush_appkey : "28b74d520261c6f78e3e0921",
  120. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  121. ]
  122. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
  123. buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
  124. resValue "string", "app_name", "小绵羊"
  125. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  126. signingConfig signingConfigs.config
  127. }
  128. }
  129. sourceSets {
  130. main() {
  131. jniLibs.srcDirs = ['src/main/libs']
  132. jni.srcDirs = [] //屏蔽掉默认的jni编译生成过程
  133. }
  134. }
  135. compileOptions {
  136. sourceCompatibility JavaVersion.VERSION_1_8
  137. targetCompatibility JavaVersion.VERSION_1_8
  138. }
  139. }
  140. repositories {
  141. flatDir {
  142. dirs 'libs'
  143. }
  144. google()
  145. }
  146. configurations.all {
  147. resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  148. def requested = details.requested
  149. if (requested.group == 'com.android.support') {
  150. if (!requested.name.startsWith("multidex")) {
  151. details.useVersion "$supportLibVersion"
  152. }
  153. }
  154. }
  155. }
  156. dependencies {
  157. // QQ 互联SDK,用于QQ分享、登录
  158. // implementation files('libs/open_sdk_3.5.14.3_rc26220c_lite.jar')
  159. implementation files('libs/open_sdk_r5923_lite.jar')
  160. def miniSdkVersion = "1.57.30"
  161. implementation("com.tencent.qqmini:minigame:${miniSdkVersion}") {
  162. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  163. }
  164. implementation("com.tencent.qqmini:minigame_external:${miniSdkVersion}") {
  165. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  166. }
  167. // 如果不使用sdk的互联模块,可以不依赖
  168. implementation("com.tencent.qqmini:minigame_open_sdk_all:${miniSdkVersion}") {
  169. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  170. }
  171. //noinspection GradleCompatible
  172. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  173. //noinspection GradleCompatible
  174. implementation 'androidx.cardview:cardview:1.0.0'
  175. implementation('com.google.android.material:material:1.0.0') {
  176. // exclude group: 'com.android.support', module: 'support-annotations'
  177. // exclude group: 'com.android.support', module: 'support-compat'
  178. // exclude group: 'com.android.support', module: 'support-core-ui'
  179. // exclude group: 'com.android.support', module: 'support-core-utils'
  180. // exclude group: 'com.android.support', module: 'support-fragment'
  181. // exclude group: 'com.android.support', module: 'transition'
  182. // exclude group: 'com.android.support', module: 'appcompat-v7'
  183. // exclude group: 'com.android.support', module: 'cardview-v7'
  184. // exclude group: 'com.android.support', module: 'recyclerview-v7'
  185. }
  186. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  187. testImplementation 'junit:junit:4.12'
  188. implementation 'com.google.code.gson:gson:2.8.2'
  189. // implementation 'com.shark:screencapture:1.0.0'
  190. implementation('com.jcodecraeer:xrecyclerview:1.5.9') {
  191. // exclude group: 'com.android.support', module: 'design'
  192. // exclude group: 'com.android.support', module: 'recyclerview'
  193. // exclude group: 'com.android.support', module: 'appcompat'
  194. }
  195. implementation 'com.squareup.wire:wire-runtime:3.6.0'
  196. implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  197. implementation 'org.greenrobot:eventbus:3.1.1'
  198. // implementation 'com.zhy:base-adapter:3.0.3'
  199. // implementation 'com.liulishuo.filedownloader:library:1.6.9'
  200. implementation 'com.tencent.bugly:crashreport_upgrade:1.3.5'
  201. implementation(name: 'alipaySdk-15.5.9', ext: 'aar')
  202. implementation(name: 'ad_dk_sdk', ext: 'aar')
  203. implementation(name: 'klevinSDK_2.0.0.21', ext: 'aar')
  204. implementation(name: 'lygamewrapper-sheep-release', ext: 'aar') {
  205. exclude group: 'com.google.android', module: 'exoplayer2'
  206. }
  207. //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
  208. implementation 'com.tencent.bugly:nativecrashreport:3.3.1'
  209. //其中latest.release指代最
  210. implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.1.6"
  211. // implementation 'de.hdodenhof:circleimageview:2.2.0'
  212. implementation 'org.xutils:xutils:3.5.0'
  213. // implementation 'com.mylhyl:acp:1.1.7'
  214. implementation('cn.yipianfengye.android:zxing-library:2.2') {
  215. // exclude group: 'com.android.support', module: 'appcompat-v7'
  216. // exclude group: 'com.android.support', module: 'support-v4'
  217. }
  218. implementation(name: 'newbie-guide-2.4.0.1', ext: 'aar')
  219. debugImplementation 'androidx.multidex:multidex:2.0.0'
  220. //不要修改这里,相信我
  221. releaseImplementation 'androidx.multidex:multidex:2.0.0'
  222. implementation(name: 'com.kfzs.safe-202403062150', ext: 'aar')
  223. //butterknife
  224. // implementation('com.jakewharton:butterknife:8.8.1') {
  225. ////// exclude group: 'com.android.support', module: 'support-annotations'
  226. ////// exclude group: 'com.android.support', module: 'support-compat'
  227. ////// exclude group: 'com.jakewharton', module: 'butterknife-annotations'
  228. //// }
  229. //// annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  230. implementation 'com.jakewharton:butterknife:10.0.0'
  231. annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
  232. //dagger2
  233. // implementation 'com.google.dagger:dagger:+'
  234. // implementation 'com.google.dagger:dagger-compiler:+'
  235. compileOnly 'org.glassfish:javax.annotation:10.0-b28'
  236. //javax.annotation', module: 'jsr250-api
  237. implementation 'com.google.dagger:dagger:2.12'
  238. //javax.inject', module: 'javax.inject
  239. annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
  240. //retrofit
  241. implementation('com.squareup.retrofit2:retrofit:2.4.0') {
  242. exclude group: 'com.google.android', module: 'android'
  243. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  244. exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
  245. }
  246. //不知道接进来干嘛的,与当前的oaid冲突
  247. //implementation(name: 'msa_mdid_1.0.13', ext: 'aar')
  248. implementation(name: 'oaid_sdk_1.0.25', ext: 'aar')
  249. implementation(name: 'JasmineSDK_v1.2.5', ext: 'aar')
  250. // implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
  251. implementation('org.ligboy.retrofit2:converter-fastjson-android:2.1.0') {
  252. exclude group: 'com.alibaba', module: 'fastjson'
  253. exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  254. }
  255. // implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
  256. // implementation 'com.squareup.retrofit2:adapter-rxjava2:+'
  257. // implementation ('com.squareup.retrofit2:adapter-rxjava:2.1.0') {
  258. // exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  259. // }
  260. implementation('com.squareup.retrofit2:adapter-rxjava2:2.5.0') {
  261. exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  262. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  263. }
  264. //rxjava
  265. implementation('io.reactivex.rxjava2:rxandroid:2.1.0') {
  266. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  267. }
  268. implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
  269. //获取动态权限三方库
  270. implementation('pub.devrel:easypermissions:1.2.0') {
  271. // exclude group: 'com.android.support', module: 'appcompat-v7'
  272. // exclude group: 'com.android.support', module: 'support-compat'
  273. // exclude group: 'com.android.support', module: 'support-fragment'
  274. }
  275. // implementation 'net.danlew:android.joda:2.9.3'
  276. // implementation 'com.orhanobut:logger:1.15'
  277. //友盟
  278. implementation 'com.umeng.sdk:common:1.5.3'
  279. //implementation 'com.umeng.sdk:analytics:latest.integration'
  280. //添加半袋米相关
  281. implementation(name: 'appstoreutils-201810101432', ext: 'aar')
  282. implementation project(':view')
  283. // implementation(name: 'view-release', ext: 'aar')
  284. // implementation 'com.flipboard:bottomsheet-core:1.5.3'
  285. // implementation 'com.flipboard:bottomsheet-commons:1.5.3'
  286. // implementation files('libs/open_sdk_r5923_lite.jar')
  287. // implementation files('libs/wechat-sdk-android-with-mta-1.1.6.jar')
  288. implementation files('libs/umeng_social_tool.jar')
  289. implementation files('libs/umeng_social_shareboard.jar')
  290. implementation files('libs/umeng_social_net.jar')
  291. implementation files('libs/umeng_social_api.jar')
  292. implementation files('libs/umeng_shareboard_widget.jar')
  293. implementation files('libs/SocialSDK_WeiXin_Full.jar')
  294. implementation files('libs/SocialSDK_QQ_Full.jar')
  295. implementation('com.zhy:okhttputils:2.6.2') {
  296. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  297. }
  298. // implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  299. implementation 'androidx.annotation:annotation:1.0.0'
  300. implementation('androidx.recyclerview:recyclerview:1.0.0') {
  301. // exclude group: 'com.android.support', module: 'support-annotations'
  302. // exclude group: 'com.android.support', module: 'support-compat'
  303. // exclude group: 'com.android.support', module: 'support-core-ui'
  304. }
  305. // implementation('com.github.ithedan:TextViewDrawable:v1.0') {
  306. // exclude group: 'com.android.support', module: 'appcompat-v7'
  307. // }
  308. // implementation 'com.github.zhangkexpz:LayoutScroll:v1.0'
  309. // implementation 'me.iwf.photopicker:PhotoPicker:0.9.12@aar'
  310. implementation(name: 'PhotoPicker-release-20200506', ext: 'aar')
  311. implementation('com.github.bumptech.glide:glide:4.9.0') {
  312. // exclude group: 'com.android.support', module: 'support-fragment'
  313. // exclude group: 'com.github.bumptech.glide', module: 'gifdecoder'
  314. // exclude group: 'com.github.bumptech.glide', module: 'disklrucache'
  315. // exclude group: 'com.github.bumptech.glide', module: 'annotations'
  316. }
  317. annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
  318. // implementation 'com.github.yalantis:ucrop:2.2.1-native'
  319. // implementation 'com.google.zxing:core:3.3.0'
  320. implementation project(':ucrop')
  321. implementation('com.sunfusheng:marqueeview:1.3.3') {
  322. // exclude group: 'com.android.support', module: 'appcompat-v7'
  323. }
  324. //极光
  325. implementation files('libs/jcore-android-1.2.0.jar')
  326. implementation files('libs/jpush-android-3.1.2.jar')
  327. //定位
  328. implementation files('libs/BaiduLBS_Android.jar')
  329. //幂动科技
  330. implementation(name: 'mdsdk_1031_1_3_7_4', ext: 'aar')
  331. //轮播图
  332. implementation 'com.youth.banner:banner:1.4.10'
  333. //最新版本
  334. //loading
  335. implementation 'com.github.ybq:Android-SpinKit:1.2.0'
  336. // implementation 'com.github.nanchen2251:CompressHelper:1.0.5'
  337. // implementation(name: 'compresshelper-release', ext: 'aar')
  338. implementation files('libs/compresshelper-release.jar')
  339. implementation('com.haibin:calendarview:3.4.8') {
  340. // exclude group: 'com.android.support', module: 'appcompat-v7'
  341. // exclude group: 'com.android.support', module: 'recyclerview-v7'
  342. }
  343. implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14'
  344. implementation 'org.greenrobot:greendao:3.2.2'
  345. //org.greenrobot', module: 'greendao-api
  346. //okDownload
  347. // core
  348. implementation 'com.liulishuo.okdownload:okdownload:1.0.5'
  349. // provide sqlite to store breakpoints
  350. implementation 'com.liulishuo.okdownload:sqlite:1.0.5'
  351. // provide okhttp to connect to backend
  352. implementation 'com.liulishuo.okdownload:okhttp:1.0.5'
  353. implementation('com.trello.rxlifecycle2:rxlifecycle-components:2.2.2') {
  354. // exclude group: 'com.android.support', module: 'appcompat-v7'
  355. // com.trello.rxlifecycle2', module: 'rxlifecycle-android
  356. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  357. }
  358. //
  359. // implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
  360. //有米科技
  361. implementation(name: 'YoumiSdk_v8.3.0_2018-09-20', ext: 'aar')
  362. implementation project(':WaterWaveProgress')
  363. implementation 'androidx.exifinterface:exifinterface:1.0.0'
  364. implementation('com.qiniu:qiniu-android-sdk:7.3.13') {
  365. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  366. }
  367. api project(':media')
  368. //https://github.com/didi/VirtualAPK
  369. // implementation 'com.didi.virtualapk:core:0.9.8'
  370. //fast json
  371. implementation 'com.alibaba:fastjson:1.2.52'
  372. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34'
  373. // implementation 'com.github.yangjie10930:EpMedia:v0.9.5'
  374. //webView 缓存优化初始化 https://github.com/yale8848/CacheWebView
  375. // implementation 'ren.yale.android:cachewebviewlib:2.1.4'
  376. implementation(name: 'cachewebviewlib-2.1.8', ext: 'aar')
  377. //GSYVideoPlayer https://github.com/CarGuo/GSYVideoPlayer
  378. implementation 'com.shuyu:gsyVideoPlayer-java:6.0.3'
  379. //是否需要ExoPlayer模式
  380. implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.2'
  381. implementation 'com.makeramen:roundedimageview:2.3.0'
  382. //https://github.com/koral--/android-gif-drawable
  383. implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
  384. implementation 'androidx.annotation:annotation:1.0.1'
  385. //鸿途信达 广告sdk
  386. // implementation(name: 'ad-htxd-201901071720', ext: 'aar')
  387. //切换皮肤框架 https://github.com/ximsfei/Android-skin-support
  388. // implementation 'skin.support:skin-support:4.0.1' // skin-support
  389. // implementation 'skin.support:skin-support-appcompat:4.0.1' // skin-support 基础控件支持
  390. // implementation 'skin.support:skin-support-design:4.0.1' // skin-support-design material design 控件支持[可选]
  391. // implementation 'skin.support:skin-support-cardview:4.0.1' // skin-support-cardview CardView 控件支持[可选]
  392. // implementation 'skin.support:skin-support-constraint-layout:4.0.1' // skin-support-constraint-layout ConstraintLayout 控件支持[可选]
  393. implementation project(':skin-support')
  394. // implementation 'skin.support:skin-support:3.1.1' // skin-support 基础控件支持
  395. implementation 'skin.support:skin-support-design:3.1.1'
  396. // skin-support-design material design 控件支持[可选]
  397. implementation 'skin.support:skin-support-cardview:3.1.1'
  398. // skin-support-cardview CardView 控件支持[可选]
  399. implementation 'skin.support:skin-support-constraint-layout:3.1.1'
  400. // skin-support-constraint-layout ConstraintLayout 控件支持[可选]
  401. implementation 'com.r0adkll:slidableactivity:2.0.6'
  402. implementation project(':shortcut_lib')
  403. implementation 'com.github.ly-android:PermissionUtils:1.0.3'
  404. implementation files('libs/ipaynow_base_2.1.9_api1.0.0.jar')
  405. implementation files('libs/ipaynow_wechatpay_v2.0.5.jar')
  406. // implementation(name: 'face-sdk-release', ext: 'aar')
  407. implementation project(':faceplatform-ui')
  408. // implementation project(':faceplatform-release')
  409. implementation 'com.airbnb.android:lottie:2.7.0'
  410. }
  411. static def releaseTime() {
  412. return new Date().format("MMddHHmm", TimeZone.getDefault())
  413. }
  414. //在apk文件后边生成版本号信息
  415. android.applicationVariants.all {
  416. variant ->
  417. variant.outputs.all {
  418. output ->
  419. // if (buildType.name == "release") {
  420. outputFileName = "${productFlavors[0].name}_${buildType.name}_v${versionName}_${versionCode}-${releaseTime()}.apk"
  421. // }
  422. }
  423. }