Last active
February 22, 2018 07:14
-
-
Save VladimirMi/101fe2c67145e2a6fa4b627d706b0f80 to your computer and use it in GitHub Desktop.
Adding variables to BuildConfig
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
def secretsProperties = new Properties() | |
secretsProperties.load(new FileInputStream("secrets.properties")) | |
android { | |
defaultConfig { | |
buildConfigField("String", "API_KEY", "\"${secretsProperties['apiKey']}\"") | |
} | |
} |
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
apiKey=your_api_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment