mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-04-20 11:36:10 +00:00
29 lines
No EOL
756 B
Groovy
29 lines
No EOL
756 B
Groovy
apply plugin: 'io.fabric'
|
|
|
|
ext.getFabricApiKey = {
|
|
return System.getenv('FABRIC_APIKEY') ?: "xxxe76c4xxxx97e8cxxxx0135e9d46f5a2xxx"
|
|
}
|
|
|
|
ext.getFabricApiSecret = {
|
|
return System.getenv('FABRIC_APISECRET') ?: "xx68f6074dxxxxxc11dxxx97c172e8ebf0"
|
|
}
|
|
|
|
def buildFabricProperties() {
|
|
def propertiesFile = file("fabric.properties")
|
|
def apiSecret = getFabricApiSecret()
|
|
def apiKey = getFabricApiKey()
|
|
|
|
if (propertiesFile.exists()) {
|
|
propertiesFile.delete()
|
|
}
|
|
|
|
def commentMessage = "suppress inspection \"UnusedProperty\" for whole file"
|
|
ant.propertyfile(file: "fabric.properties", comment: commentMessage) {
|
|
entry(key: "apiSecret", value: apiSecret)
|
|
entry(key: "apiKey", value: apiKey)
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
buildFabricProperties()
|
|
} |