Created
December 12, 2013 07:44
-
-
Save youxiachai/7924511 to your computer and use it in GitHub Desktop.
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
apply plugin: 'android' | |
tasks.withType(Compile) { | |
options.encoding = "UTF-8" | |
} | |
dependencies { | |
// compile fileTree(dir: 'libs', include: '*.jar') | |
compile files('libs/fastjson-1.1.34.android.jar') | |
compile files('libs/umeng_sdk.jar') | |
compile files('libs/youxiachai-aquery-ajax.jar') | |
compile project(':Yodbank_Library.SlidingMenu') | |
} | |
android { | |
compileSdkVersion 17 | |
buildToolsVersion "18.1.0" | |
signingConfigs { | |
alphaConfig { | |
storeFile file("alpha.keystore") | |
storePassword "xxxxxx" | |
keyAlias "xxx" | |
keyPassword "xxxxx" | |
} | |
} | |
buildTypes { | |
release { | |
runProguard true | |
proguardFile 'proguard-android.txt' | |
} | |
alpha { | |
packageNameSuffix ".alpha" | |
runProguard true | |
proguardFile 'proguard-android.txt' | |
signingConfig signingConfigs.alphaConfig | |
} | |
} | |
productFlavors { | |
} | |
sourceSets { | |
main { | |
manifest.srcFile 'AndroidManifest.xml' | |
java.srcDirs = ['src'] | |
resources.srcDirs = ['src'] | |
aidl.srcDirs = ['src'] | |
renderscript.srcDirs = ['src'] | |
res.srcDirs = ['res'] | |
assets.srcDirs = ['assets'] | |
} | |
// Move the tests to tests/java, tests/res, etc... | |
// Move the build types to build-types/<type> | |
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... | |
// This moves them out of them default location under src/<type>/... which would | |
// conflict with src/ being used by the main source set. | |
// Adding new build types or product flavors should be accompanied | |
// by a similar customization. | |
debug.setRoot('build-types/debug') | |
release.setRoot('build-types/release') | |
alpha.setRoot('build-types/alpha'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, 请教一下,我通过setRoot来设置flavor或者buildTypes的代码目录,如果是配置文件则没有问题,如果是java文件就会报“类重复”的编译错误?