Created
February 16, 2020 21:32
-
-
Save lordcodes/07795cc179a47d9d70a49a2f8e5a7230 to your computer and use it in GitHub Desktop.
Code for the article: "Protecting secrets in an Android project"
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
| fun Project.propertyOrEmpty(name: String): String { | |
| val property = findProperty(name) as String? | |
| return property ?: environmentVariable(name) | |
| } | |
| fun environmentVariable(name: String) = System.getenv(name) ?: "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment