Created
September 24, 2014 06:51
-
-
Save xxnjdlys/f8898cc0e5854e0532b5 to your computer and use it in GitHub Desktop.
Manifest-merger gradle version > 1.10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* see http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger for help | |
*/ | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.2' | |
} | |
} | |
apply plugin: 'com.android.application' | |
repositories { | |
mavenCentral() | |
} | |
android { | |
compileSdkVersion 20 | |
buildToolsVersion '20.0.0' | |
defaultConfig { | |
minSdkVersion 9 | |
targetSdkVersion 20 | |
versionCode 110 | |
versionName "1.1.0TEST" | |
manifestPlaceholders = [umvalue: "wktv"] | |
} | |
final Console console = System.console(); | |
if (console != null) { | |
signingConfigs { | |
release { | |
storeFile file(System.getenv("KEYSTORE_WKTV")) | |
storePassword System.getenv("KEYSTORE_PWD_WKTV") | |
keyAlias System.getenv("KEY_ALIAS_WKTV") | |
keyPassword System.getenv("KEYSTORE_PWD_WKTV") | |
} | |
} | |
} else { | |
signingConfigs { | |
release { | |
} | |
} | |
} | |
def File customerProguardFile = file('src/proguard.cfg') | |
buildTypes { | |
release { | |
runProguard true | |
// proguardFile getDefaultProguardFile('proguard-android-optimize.txt') | |
proguardFile customerProguardFile.path | |
signingConfig signingConfigs.release | |
} | |
debug{ | |
versionNameSuffix "-DEBUG-TEST" | |
runProguard false | |
debuggable true | |
} | |
} | |
productFlavors { | |
update {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "update"]} | |
shafa {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "shafa"]} | |
// aitv {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "aitv"]} | |
// wostore {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "wostore"]} | |
// taobao {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "taobao"]} | |
// fenxiang {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "fenxiang"]} | |
// erweima {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "erweima"]} | |
// mumayi {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "mumayi"]} | |
// googleplay {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "googleplay"]} | |
// wandoujia {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "wandoujia"]} | |
// xiaomi {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "xiaomi"]} | |
// baidu {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "baidu"]} | |
// qihu {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "qihu"]} | |
// meizu {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "meizu"]} | |
// yingyongbao {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "yingyongbao"]} | |
// anzhuo {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "anzhuo"]} | |
// anzhi {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "anzhi"]} | |
// jifeng {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "jifeng"]} | |
// huawei {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "huawei"]} | |
// nduo {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "nduo"]} | |
// UMENG_CHANNEL_VALUE {proguardFile 'proguard-rules.txt';manifestPlaceholders = [umvalue: "UMENG_CHANNEL_VALUE"]} | |
} | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
compile ('com.android.support:appcompat-v7:19.0.0'){force = true} | |
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.1' | |
compile 'com.google.code.gson:gson:2.2.4' | |
compile 'com.makeramen:roundedimageview:1.3.0' | |
compile 'com.squareup:otto:1.3.5' | |
compile 'com.loopj.android:android-async-http:1.4.6' | |
compile project(':common') | |
} | |
tasks.withType(JavaCompile) { | |
options.encoding = "UTF-8" | |
} | |
task loadfile << { | |
def File customerProguardFile = file('src/proguard.cfg') | |
println "Proguard File path: " + customerProguardFile.path | |
println "Proguard File name: " + customerProguardFile.name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment