Skip to content

Instantly share code, notes, and snippets.

@RaghavSood
Created November 8, 2017 15:28
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 RaghavSood/4282381197bcd94ae84a39e947393f97 to your computer and use it in GitHub Desktop.
Save RaghavSood/4282381197bcd94ae84a39e947393f97 to your computer and use it in GitHub Desktop.
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.yourapp"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName project.APP_VERSION
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "GIT_BRANCH", "\"" + gitBranch() + "\""
buildConfigField "String", "GIT_SHA", "\"" + gitSHA() + "\""
def onCi = System.getenv("CI")
if (onCi.equals("true")) {
buildConfigField "String", "BUILT_ON", "\"CI\""
versionCode System.getenv("CIRCLE_BUILD_NUM") as Integer
} else {
buildConfigField "String", "BUILT_ON", "\"local\""
versionCode 1
}
}
signingConfigs {
release {
storeFile file('release.keystore')
storePassword System.getenv("RELEASE_KEYSTORE_PASSWORD")
keyAlias 'yourapp-prod'
keyPassword System.getenv("RELEASE_KEYSTORE_PASSWORD")
}
debug {
storeFile file('debug.keystore')
storePassword System.getenv("DEBUG_KEYSTORE_PASSWORD")
keyAlias 'yourapp-debug'
keyPassword System.getenv("DEBUG_KEYSTORE_PASSWORD")
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment