Created
November 8, 2017 15:28
-
-
Save RaghavSood/4282381197bcd94ae84a39e947393f97 to your computer and use it in GitHub Desktop.
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
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