android 渠道配置manifest,android 多渠道打包,build.gradle文件配置、manifest文件配置...

apply plugin: 'com.android.application'android {

signingConfigs {

SP {

keyAlias'ywyysq'keyPassword'123456'storeFilefile('/Users/apple/AndroidStudioProjects/APPKEY/ywyysq.jks')

storePassword'123456'}

}

compileSdkVersion 22buildToolsVersion '23.0.2'defaultConfig {

applicationId"com.jshy.yyyysq"minSdkVersion 14targetSdkVersion 22versionCode2versionName"2.0"multiDexEnabledtrue//dex突破65535限制}

buildTypes {

all {

buildConfigField "String", "GIT_REVISION", "\"${getGitRevision()}\""manifestPlaceholders= [UMENG_APPKEY: "56e6164e67e58e9a23000439",]

}

debug {

applicationIdSuffix".debug"versionNameSuffix"-Debug"resValue "string", "app_name", "调试1.0"}

release {

minifyEnabledtrue //译:使变小enabled。 即启用混淆器shrinkResources truezipAlignEnabledfalse//设置为false 为了不产生unaligned的apk //混淆后的zip优化,默认为true,可不写。当不显示配置为true时,不会生成unaligned.apksigningConfigsigningConfigs.SP

resValue "string", "app_name", "AU影院"/*if (project.hasProperty("keyPath") && project.hasProperty("keyPass") && project.hasProperty("keyAlias")) {signingConfigs.release.storeFile file(keyPath)signingConfigs.release.keyAlias = keyAliassigningConfigs.release.storePassword = keyPasssigningConfigs.release.keyPassword = keyPass}*/proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'applicationVariants.all { variant ->

variant.outputs.each { output ->

defoutputFile = output.outputFile

if(outputFile != null&& outputFile.name.endsWith('.apk')) {

deffileName = "${variant.productFlavors[0].name}_${getDate()}_${getGitRevision()}.apk"output.outputFile = newFile(outputFile.parent, fileName)

}

}

}

}

}

// 多渠道打包productFlavors {

jshy_video {

manifestPlaceholders= [

JSPAY_APP_KEY: "ekiw8kkjq38vqgc",

//LINE_ENSURE: "***************"CHANNEL_KEY: "59f99ab6901e151edadf8792a643f7a3",

//LINE_ENSURE: "********************************"UMENG_VALUE: "sp0100"//LINE_ENSURE: "******"]

}

xinlianAZ01 {

manifestPlaceholders= [

JSPAY_APP_KEY: "ekiw8kkjq38vqgc",

//LINE_ENSURE: "***************"CHANNEL_KEY: "59f99ab6901e151edadf8792a643f7a3",

//LINE_ENSURE: "********************************"UMENG_VALUE: "sp0422"//LINE_ENSURE: "******"]

}

lianmeng69 {

manifestPlaceholders= [

JSPAY_APP_KEY: "o0wiv04i20g8mwf",

//LINE_ENSURE: "***************"CHANNEL_KEY: "c956d0e9766579062c5c63dd9525d2d0",

//LINE_ENSURE: "********************************"UMENG_VALUE: "sp0301"//LINE_ENSURE: "******"]

}

}

compileOptions {

sourceCompatibilityJavaVersion.VERSION_1_7targetCompatibilityJavaVersion.VERSION_1_7}

}

defgetDate() {

defdate = newDate()

defformattedDate = date.format('yyyyMMdd-HHmmss')

returnformattedDate

}

defgetGitRevision() {

return"git rev-parse --short HEAD".execute().text.trim()

}

defreplace(filePath, oldStr, newStr) {

deff = file(filePath)

String content = f.getText()

content = content.replaceAll(oldStr, newStr)

f.write(content)

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:appcompat-v7:22.2.0'compile files('libs/jsoup-1.8.1.jar')

compile files('libs/TencentLocationSDK_v4.0_r139747.jar')

compile files('libs/JshyPay_zw_asset_14.1.jar')

compile files('libs/mmlog.jar')

compile files('libs/universal-image-loader-1.9.5.jar')

compile files('libs/pay_plugin.jar')

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值