123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- apply plugin: 'com.android.application'
- //apply plugin: 'io.fabric'
- repositories {
- mavenCentral()
- mavenLocal()
- flatDir {
- dirs 'libs'
- }
- }
- def bakPath = file("${buildDir}/bakApk/")
- android {
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
- defaultConfig {
- applicationId "com.smileflowpig.money"
- minSdkVersion 19
- targetSdkVersion 28
- versionCode 12
- versionName "2.1.1"
- multiDexEnabled true
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- //签名
- signingConfigs {
- myConfig {
- storeFile file("bangnidai.jks") //签名文件
- storePassword "bangnidai123"
- keyAlias "bangnidai"
- keyPassword "bangnidai123" //签名密码
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.myConfig
- multiDexEnabled true
- minifyEnabled false
- proguardFiles 'proguard-rules.pro'
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- if (output.outputFile != null && output.outputFile.name.endsWith('.apk')
- && 'release'.equals(variant.buildType.name)) {
- def apkFile = new File(
- output.outputFile.getParent(),
- "xiaohuazhu${variant.flavorName}_v${variant.versionName}_${releaseTime()}.apk")
- output.outputFile = apkFile
- }
- }
- }
- }
- debug {
- signingConfig signingConfigs.myConfig
- minifyEnabled false
- multiDexEnabled true
- proguardFiles 'proguard-rules.pro'
- }
- }
- productFlavors {
- aoppo {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1006"]
- buildConfigField 'String', 'CHANNLE', '"1006"'
- }
- a360 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1002"]
- buildConfigField 'String', 'CHANNLE', '"1002"'
- }
- ayingyongbao {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1001"]
- buildConfigField 'String', 'CHANNLE', '"1001"'
- }
- axiaomi {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1004"]
- buildConfigField 'String', 'CHANNLE', '"1004"'
- }
- ahuawei {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1005"]
- buildConfigField 'String', 'CHANNLE', '"1005"'
- }
- ameizu {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1007"]
- buildConfigField 'String', 'CHANNLE', '"1007"'
- }
- avivo {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1003"]
- buildConfigField 'String', 'CHANNLE', '"1003"'
- }
- search360 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "4001"]
- buildConfigField 'String', 'CHANNLE', '"4001"'
- }
- smss01 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40002"]
- buildConfigField 'String', 'CHANNLE', '"40002"'
- }
- smss02 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40003"]
- buildConfigField 'String', 'CHANNLE', '"40003"'
- }
- smss03 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40004"]
- buildConfigField 'String', 'CHANNLE', '"40004"'
- }
- smss07 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40005"]
- buildConfigField 'String', 'CHANNLE', '"40005"'
- }
- smss08 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40006"]
- buildConfigField 'String', 'CHANNLE', '"40006"'
- }
- smss09 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40007"]
- buildConfigField 'String', 'CHANNLE', '"40007"'
- }
- smss10 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40008"]
- buildConfigField 'String', 'CHANNLE', '"40008"'
- }
- smss11 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40009"]
- buildConfigField 'String', 'CHANNLE', '"40009"'
- }
- smss13 {
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40025"]
- buildConfigField 'String', 'CHANNLE', '"40025"'
- }
- }
- }
- def releaseTime() {
- return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
- }
- dependencies {
- compile fileTree(include: ['*.jar'], dir: 'libs')
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- // compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
- // transitive = true;
- // }
- compile(name: 'base', ext: 'aar')
- // compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
- // compile "com.android.support:recyclerview-v7:$rootProject.ext.supportVersi
- // on"
- // compile "com.android.support:design:$rootProject.ext.supportVersion"
- compile "net.qiujuer.genius:ui:$rootProject.ext.geniusVersion"
- compile "net.qiujuer.genius:res:$rootProject.ext.geniusVersion"
- compile "de.hdodenhof:circleimageview:$rootProject.ext.circleimageviewVersion"
- compile "com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
- compile "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
- annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
- compile "pub.devrel:easypermissions:$rootProject.ext.easyPMVersion"
- // 空气面板
- compile "net.qiujuer.widget:airpanel:$rootProject.ext.airpanelVersion"
- compile project(':common')
- compile project(':lang')
- compile project(':factory')
- compile project(':PhotoPicker')
- compile 'com.liulishuo.filedownloader:library:1.6.5'
- compile 'org.jsoup:jsoup:1.9.2'
- compile 'com.lovedise:permissiongen:0.0.6'
- compile 'q.rorbin:badgeview:1.1.2'
- compile 'com.youth.banner:banner:1.4.9'
- compile 'com.github.addappcn:android-pickers:1.0.3'
- compile 'com.contrarywind:Android-PickerView:4.1.6'
- compile 'com.android.support.constraint:constraint-layout:1.0.2'
- // compile 'com.android.support:support-v4:25.+'
- compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
- compile 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'
- compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.1'
- compile 'org.greenrobot:eventbus:3.0.0'
- compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
- testCompile 'junit:junit:4.12'
- compile 'com.github.lsjwzh.RecyclerViewPager:lib:v1.1.2'
- compile 'com.github.mcxtzhang:SuspensionIndexBar:V1.0.0'
- compile 'com.squareup.retrofit2:retrofit:2.3.0'
- compile 'com.squareup.retrofit2:converter-gson:2.3.0'
- compile 'io.reactivex.rxjava2:rxjava:2.1.6'
- compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
- compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
- compile 'com.zhy:autolayout:1.4.5'
- compile 'com.xhb:xbanner:1.4.1'
- compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
- compile 'com.contrarywind:Android-PickerView:4.1.6'
- compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
- compile 'com.amap.api:location:latest.integration'
- compile 'me.yokeyword:indexablerecyclerview:1.3.0'
- compile 'com.umeng.umsdk:analytics:latest.integration'
- compile 'com.umeng.umsdk:common:latest.integration'
- compile 'com.android.support:cardview-v7:25.2.0'
- compile files('libs/umeng-share-wechat-simplify-6.9.3.jar')
- compile files('libs/MiPush_SDK_Client_3_6_9.jar')
- compile 'com.huawei.android.hms:push:2.6.1.301'
- compile 'com.huawei.android.hms:hwid:2.6.1.301'
- compile files('libs/vivo_pushsdk_v2.3.1.jar')
- compile 'com.alibaba:fastjson:1.2.54'
- compile 'com.alibaba:fastjson:1.1.70.android'
- compile project(':ocr_ui')
- }
- def product_name = "bangnidai_v" + android.defaultConfig.versionName
- def time = "1367"
- task initTimeScape << {
- println "first time"
- println "$time"
- def gCalendar = new GregorianCalendar()
- time = gCalendar.time.format("MMddHHmm")
- println "second time"
- println "$time"
- }
- task initReleaseApkProduct_name(dependsOn: ['initTimeScape']) << {
- //初始化release包名
- product_name = product_name + "_" + time + "R.apk"
- def outputName = "_OUT:>PRODUCT_FILENAME=" + product_name + ";_"
- println "$outputName"
- }
- task initDebugApkProduct_name(dependsOn: ['initTimeScape']) << { //初始化release包名
- product_name = product_name + "_" + time + "D.apk"
- def outputName = "_OUT:>PRODUCT_FILENAME=" + product_name + ";_"
- println "$outputName"
- }
- task release(dependsOn: ['assembleRelease', 'initReleaseApkProduct_name']) << {
- copy {
- from('build/outputs/apk') {
- include('**/*-release.apk')
- rename '(.*)-release.apk', product_name
- }
- from('build/proguard/release') {
- include('**/mapping.txt')
- rename '(.*).txt', product_name + ".map"
- }
- into('products')
- }
- }
- task debug(dependsOn: ['assembleDebug', 'initDebugApkProduct_name']) << {
- copy {
- from('build/outputs/apk') {
- include('**/*.apk')
- rename '(.*).apk', product_name
- }
- into('products')
- }
- }
|