Skip to content
Snippets Groups Projects
Commit 0feceff0 authored by Lennart Goedhart's avatar Lennart Goedhart
Browse files

Make BUGFENDER_API_KEY optional, and set from an environment variable.

parent 4f0d0369
No related branches found
No related tags found
No related merge requests found
...@@ -3,5 +3,4 @@ build ...@@ -3,5 +3,4 @@ build
fabric.properties fabric.properties
local.properties local.properties
.idea .idea
bugfender.properties
/app/app.iml /app/app.iml
...@@ -49,10 +49,15 @@ def gitBranch() { ...@@ -49,10 +49,15 @@ def gitBranch() {
return ext.repo.branch.current.name return ext.repo.branch.current.name
} }
static def getBugfenderApiKey() { def getBugfenderApiKey() {
Properties properties = new Properties() String bugfenderApiKey = System.getenv("BUGFENDER_API_KEY")
properties.load(new FileInputStream("app/bugfender.properties"))
return "\"" + properties.getProperty("apiKey", "") + "\"" if(bugfenderApiKey == null) {
logger.warn("Bugfender API key not set")
bugfenderApiKey = ""
}
return "\"" + bugfenderApiKey + "\""
} }
android { android {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment