您的位置:首页 > 产品设计 > UI/UE

Gradle Build配置

2016-03-21 15:26 489 查看

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.example.demo"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0.0"
resConfigs "zh"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
multiDexEnabled true
//使用Jack编译工具
jackOptions {
enabled true
}
}
sourceSets {
main {
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}
signingConfigs {
debug {
storeFile file("/Users/biyinjishi/BYJSWorks/Android/YinBiSanJia/key/testkeystore.jks")
storePassword "tanranran"
keyAlias "印比三家"
keyPassword "tanranran"
}
release {
}
}
buildTypes {
debug {
buildConfigField "boolean", "LOG_DEBUG", "true"
minifyEnabled false
shrinkResources false
zipAlignEnabled false
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
manifestPlaceholders = [BAIDU_API_KEY: "XXXX"]
}
release {
buildConfigField "boolean", "LOG_DEBUG", "false"
minifyEnabled true
shrinkResources true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
manifestPlaceholders = [BAIDU_API_KEY: "XXXX"]
}
}
splits {
abi {
enable true
reset()
include 'x86' //select ABIs to build APKs for
universalApk true //generate an additional APK that contains all the ABIs
}
}
lintOptions {
abortOnError false
}
aaptOptions {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
lintOptions {
abortOnError false
checkAllWarnings false
ignoreWarnings true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/CERT.SF'
exclude 'META-INF/CERT.RSA'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/ASL2.0'
   }
dexOptions {
incremental true //增量编译
preDexLibraries = false
jumboMode = true
javaMaxHeapSize "4096M"
maxProcessCount=4
threadCount=4
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: