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
fabric.properties
local.properties
.idea
bugfender.properties
/app/app.iml
......@@ -49,10 +49,15 @@ def gitBranch() {
return ext.repo.branch.current.name
}
static def getBugfenderApiKey() {
Properties properties = new Properties()
properties.load(new FileInputStream("app/bugfender.properties"))
return "\"" + properties.getProperty("apiKey", "") + "\""
def getBugfenderApiKey() {
String bugfenderApiKey = System.getenv("BUGFENDER_API_KEY")
if(bugfenderApiKey == null) {
logger.warn("Bugfender API key not set")
bugfenderApiKey = ""
}
return "\"" + bugfenderApiKey + "\""
}
android {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment