Skip to content

Instantly share code, notes, and snippets.

@ckdevrel
Last active February 9, 2018 04:52
Show Gist options
  • Save ckdevrel/cf14ab160901004cdcc0f03bf9bbe35a to your computer and use it in GitHub Desktop.
Save ckdevrel/cf14ab160901004cdcc0f03bf9bbe35a to your computer and use it in GitHub Desktop.
build.gradle method to read secret key from secrets.properties
def getApiKey(){
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['GOOGLE_MAPS_API_KEY']
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment