Last active
April 12, 2016 07:10
-
-
Save piruin/3fcc678de3ab5b4806924b6fd47cfce4 to your computer and use it in GitHub Desktop.
Gradle get property from system variable or local.properties
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
Properties properties = new Properties() | |
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | |
sendbirdAppId = System.hasProperty("SENDBIRD_APP_ID") ? System.getenv('SENDBIRD_APP_ID') : properties.getProperty("sendbird.app-id") | |
sendbirdApiToken = System.hasProperty("SENDBIRD_API_TOKEN") ? System.getenv('SENDBIRD_API_TOKEN') : properties.getProperty("sendbird.api-token") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment