【发布时间】:2016-04-30 05:37:18
【问题描述】:
我在 build.gradle 中创建了一个额外任务,为公共 github 存储库提供密钥。
afterEvaluate {
initFabricPropertiesIfNeeded()
}
def initFabricPropertiesIfNeeded() {
def propertiesFile = file('fabric.properties')
if (!propertiesFile.exists()) {
def commentMessage = "This is autogenerated fabric property from system environment to prevent key to be committed to source control."
ant.propertyfile(file: "fabric.properties", comment: commentMessage) {
entry(key: "apiSecret", value: FABRIC_API_SECRET)
entry(key: "apiKey", value: FABRIC_API_KEY)
}
}}
我想用 travis ci 服务器端构建它,并在环境变量设置中添加这两个变量 FABRIC_API_SECRET 和 FABRIC_API_KEY。
但构建失败并出现此异常。
配置项目 ':app' 时出现问题。
在项目 ':app' 上找不到属性 'FABRIC_API_SECRET'。
有什么想法可以解决这个问题...?
【问题讨论】:
标签: android continuous-integration travis-ci continuous-deployment