Skip to content

Instantly share code, notes, and snippets.

@8enet
Created June 4, 2015 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 8enet/ca92e87791cea498a708 to your computer and use it in GitHub Desktop.
Save 8enet/ca92e87791cea498a708 to your computer and use it in GitHub Desktop.
android gradle
apply plugin: 'com.android.application'
apply plugin: 'idea'
android {
compileSdkVersion 21
buildToolsVersion "22.0.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/NOTICE.txt'
}
defaultConfig {
applicationId "com.pkg.name"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
manifestPlaceholders = [ CHANNEL_NAME:"default"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors{
app{
manifestPlaceholders = [ CHANNEL_NAME:"app store"]
resValue "string", "app_cus_name", "app store"
buildConfigField "int", "app_t", "1"
}
game {
manifestPlaceholders = [ CHANNEL_NAME:"game"]
resValue "string", "app_cus_name", "game"
buildConfigField "int", "app_t", "2"
buildConfigField "String", "app_trfds", "\"24f\""
}
}
// productFlavors.all { flavor ->
// flavor.manifestPlaceholders = [ CHANNEL_NAME:name ]
// }
}
idea {
module {
downloadJavadoc = false
downloadSources = true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':frameworks')
compile 'com.android.support:support-v4:21.0.+'
compile 'com.android.support:recyclerview-v7:21.0.+'
}
<meta-data android:name="CHANNEL" android:value="${CHANNEL_NAME}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment