Skip to content

Instantly share code, notes, and snippets.

@mbalex99
Last active August 29, 2015 14:12
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 mbalex99/4581045b98aacb9eea84 to your computer and use it in GitHub Desktop.
Save mbalex99/4581045b98aacb9eea84 to your computer and use it in GitHub Desktop.
Specifying Android Build Variants for Different Environments
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.0.2"
defaultConfig {
applicationId "com.epoqueinc.myapp"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
prod {
packageName "com.mycompany.myapp"
}
dev {
packageName "com.mycompany.myapp.dev"
}
local{
packageName "com.mycompany.myapp.local"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment