Created
June 4, 2015 07:10
-
-
Save 8enet/ca92e87791cea498a708 to your computer and use it in GitHub Desktop.
android gradle
This file contains 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: '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.+' | |
} |
This file contains 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
<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