-
-
Save franhb/d4dc235fdcc71f2f48764fd09a7769f7 to your computer and use it in GitHub Desktop.
Revisions
-
curioustechizen created this gist
Apr 6, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ String apiKey = BuildConfig.API_KEY 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ buildTypes { applicationVariants.all { variant -> variant.buildConfigField "String", "API_KEY", "\""+getApiKey()+"\"" } } def getApiKey(){ def Properties props = new Properties() props.load(new FileInputStream(new File('secrets.properties'))) return props['API_KEY'] } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ API_KEY=my_awesome_api_key