多渠道打包build.gradle收藏版
来源:互联网 发布:mac文件夹在哪 编辑:程序博客网 时间:2024/06/06 09:38
apply plugin: 'com.android.application'
def releaseTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.xxxxx.xxxxxx"
minSdkVersion 13
targetSdkVersion 21
versionCode 1
versionName "1.0"
// dex突破65535的限制
multiDexEnabled true
// 默认是umeng的渠道
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
}
lintOptions {
abortOnError false
}
signingConfigs {
debug {
// No debug config
}
release {
storeFile file("E:/xxx/xxx/xxx.jks")
storePassword "xxxxx"
keyAlias "xxx"
keyPassword "xxxxx"
}
}
buildTypes {
debug {
minifyEnabled false
zipAlignEnabled false
shrinkResources false
signingConfig signingConfigs.debug
}
release {
//minifyEnabled
minifyEnabled true
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
// 输出apk名称为XXXX_v1.0_2015-01-15_wandoujia.apk
def fileName = "XXXX_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
}
productFlavors {
wandoujia {}
_360 {}
baidu {}
xiaomi {}
tencent {}
//加入其它的
}
productFlavors.all { flavor ->
flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
}
}
dependencies {
compile 'com.umeng.analytics:analytics:latest.integration'
//加入其它的
}
def releaseTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.xxxxx.xxxxxx"
minSdkVersion 13
targetSdkVersion 21
versionCode 1
versionName "1.0"
// dex突破65535的限制
multiDexEnabled true
// 默认是umeng的渠道
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
}
lintOptions {
abortOnError false
}
signingConfigs {
debug {
// No debug config
}
release {
storeFile file("E:/xxx/xxx/xxx.jks")
storePassword "xxxxx"
keyAlias "xxx"
keyPassword "xxxxx"
}
}
buildTypes {
debug {
minifyEnabled false
zipAlignEnabled false
shrinkResources false
signingConfig signingConfigs.debug
}
release {
//minifyEnabled
minifyEnabled true
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
// 输出apk名称为XXXX_v1.0_2015-01-15_wandoujia.apk
def fileName = "XXXX_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
}
productFlavors {
wandoujia {}
_360 {}
baidu {}
xiaomi {}
tencent {}
//加入其它的
}
productFlavors.all { flavor ->
flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
}
}
dependencies {
compile 'com.umeng.analytics:analytics:latest.integration'
//加入其它的
}
0 0
- 多渠道打包build.gradle收藏版
- 简单的多渠道打包build.gradle模板
- android studio 多渠道打包,调试正式包,build.gradle解析
- build.gradle 多渠道打包和用正式签名运行调试
- android 多渠道打包,build.gradle文件配置、manifest文件配置
- build多渠道打包
- Gradle多渠道打包
- Gradle多渠道打包
- eclipse+gradle多渠道打包
- 【Andorid】Gradle多渠道打包
- android Gradle多渠道打包
- eclipse多渠道打包(gradle)
- Gradle多渠道打包 (1)
- Gradle多渠道打包
- gradle多渠道打包
- Gradle多渠道打包
- Gradle 多渠道打包
- 使用gradle多渠道打包
- 自制MyEclipse豆沙绿主题
- Gradle代码混淆文件个人收藏版
- iOS 中间显示透明圆
- C++在VS2008的IDE环境中操作Excel2007(基础)
- c语言常见错误与注意点
- 多渠道打包build.gradle收藏版
- 【Linux学习】epoll详解
- Android 使用Fiddler对应用进行抓包(一)
- JAVA引用DLL文件方法
- swift 和 OC 混合编译的问题
- ubuntu 安装mysql+apache+php
- 北京找人帮报复小三
- IO多路复用之poll总结
- java JDBC 连接数据库查询数据与直接使用sql的疑问