Created
August 8, 2017 16:08
-
-
Save kikermo/bc5dcf1cf41ab1644edd65033dc62993 to your computer and use it in GitHub Desktop.
Simple project gradle build script with flavours
This file contains hidden or 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 { | |
... | |
defaultConfig { | |
... | |
buildConfigField "String", "API_URL", "http://default-url.com" | |
buildConfigField "String", "THIRD_PARTY_API_KEY", "rAnDomKeYF0rS3rV1ce" | |
} | |
productFlavors { | |
development{ | |
} | |
staging { | |
buildConfigField "String", "API_URL", "https://staging-url.com" | |
buildConfigField "String", "THIRD_PARTY_API_KEY", "rAnDomKeYF0rS3rV1ceSt4g1ng" | |
} | |
production { | |
buildConfigField "String", "API_URL", "https://production-url.com" | |
buildConfigField "String", "THIRD_PARTY_API_KEY", "rAnDomKeYF0rS3rV1cePr0duct10n" | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment