123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- apply plugin: "com.android.application"
- def releaseTime() {
- return new Date().format("yyyyMMddHHmmss")
- }
- android {
- compileSdkVersion 28
- defaultConfig {
- applicationId "com.edufound.android.xyyf"
- minSdkVersion 16
- targetSdkVersion 28
- versionCode 10012
- versionName "1.0.0.1.2"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- multiDexEnabled true
- flavorDimensions "versionCode"
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
- ndk {
- //选择要添加的对应 cpu 类型的 .so 库。
- // abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a','x86_64'
- // 还可以添加 'x86', , 'mips', 'mips64'
- }
- }
- signingConfigs {
- efunbox {
- keyAlias "edufound_key"
- keyPassword "edufound321"
- storeFile file("C:\\Users\\candy\\Desktop\\efunbox\\edufound.keystore")
- storePassword "edufound123"
- }
- debug {
- keyAlias "edufound_key"
- keyPassword "edufound321"
- storeFile file("C:\\Users\\candy\\Desktop\\efunbox\\edufound.keystore")
- storePassword "edufound123"
- }
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
- signingConfig signingConfigs.efunbox
- // zipAlignEnabled true
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def outputFile = output.outputFileName
- if (outputFile != null && output.outputFileName.endsWith('.apk')) {
- def fileName = "efunbox_mobile_xyyf_v${defaultConfig.versionCode}_${releaseTime()}_${variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE}_r.apk"
- def channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
- def newoutputFile = "";
- if (channel == ("2006")) {
- newoutputFile = "\\义方\\"
- } else if (channel == ("2001")) {
- newoutputFile = "\\应用宝\\"
- } else if (channel == ("2002")) {
- newoutputFile = "\\360应用市场\\"
- } else if (channel == ("2003")) {
- newoutputFile = "\\百度手机助手\\"
- } else if (channel == ("2008")) {
- newoutputFile = "\\小米\\"
- } else if (channel == ("2007")) {
- newoutputFile = "\\vivo\\"
- } else if (channel == ("2004")) {
- newoutputFile = "\\oppo\\"
- } else if (channel == ("2005")) {
- newoutputFile = "\\huawei\\"
- } else if (channel == ("2009")) {
- newoutputFile = "\\萌庄园\\"
- } else if (channel == ("2010")) {
- newoutputFile = "\\步步高\\"
- }
- output.outputFileName = new File(newoutputFile, fileName)
- }
- }
- }
- }
- debug {
- minifyEnabled false
- proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
- signingConfig signingConfigs.efunbox
- }
- }
- repositories {
- flatDir {
- dirs "libs"
- }
- mavenCentral()
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ["libs"]
- }
- }
- productFlavors {
- //义方
- channel_efunbox {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2006",
- appIcon: "@drawable/icon",
- ]
- }
- //应用宝
- channel_yyb {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2001",
- appIcon: "@drawable/icon",
- ]
- }
- //360应用市场
- channel_360 {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2002",
- appIcon: "@drawable/icon",
- ]
- }
- //百度手机助手
- channel_bdsjzs {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2003",
- appIcon: "@drawable/icon",
- ]
- }
- //vivo
- channel_vivo {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2007",
- appIcon: "@drawable/icon",
- ]
- }
- //小米
- channel_xiaomi {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2008",
- appIcon: "@drawable/icon",
- ]
- }
- //OPPO
- channel_oppo {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2004",
- appIcon: "@drawable/icon",
- ]
- }
- //华为
- channel_huawei {
- signingConfig signingConfigs.efunbox
- // applicationIdSuffix ".hw"
- manifestPlaceholders = [
- appCode: "2005",
- appIcon: "@drawable/icon",
- ]
- }
- //萌状元
- channel_mengzhuangyuan {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2009",
- appIcon: "@drawable/icon",
- ]
- }
- //步步高
- channel_bubugao {
- signingConfig signingConfigs.efunbox
- manifestPlaceholders = [
- appCode: "2010",
- appIcon: "@drawable/icon",
- ]
- }
- }
- productFlavors.all {
- flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
- }
- }
- allprojects {
- repositories {
- jcenter()
- }
- }
- dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
- implementation 'com.android.support.constraint:constraint-layout:1.0.2'
- implementation "com.android.support:appcompat-v7:28.0.0"
- implementation "android.arch.navigation:navigation-fragment:1.0.0"
- implementation "android.arch.navigation:navigation-ui:1.0.0"
- api files("libs/codec.jar")
- api files("libs/commons-codec-1.7.jar")
- api files("libs/commons-lang-2.2.jar")
- api files("libs/commons-net-3.3.jar")
- api files("libs/bcprov-jdk15-136.jar")
- api "com.google.code.gson:gson:2.8.6"
- implementation 'com.alibaba:fastjson:1.2.73'
- //微信登录、微信支付等
- implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
- //支付宝支付
- // implementation files("libs/alipaySdk-20180601.jar")
- // implementation files("libs/dom4j-1.6.1.jar")
- //okhttp
- implementation "com.squareup.okhttp3:okhttp:3.4.1"
- //多种seekbar
- implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
- //cardView
- implementation 'com.android.support:cardview-v7:28.0.0'
- //recyclerview
- implementation 'com.android.support:recyclerview-v7:28.0.0'
- //wheelview
- implementation 'com.cncoderx.wheelview:library:1.2.5'
- //阿里一键登录和校验
- // implementation(name: 'crashshield-release', ext: 'aar')
- // implementation(name: 'phoneNumber-L-AuthSDK-2.11.1.1', ext: 'aar')
- // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
- implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
- implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
- }
|