0
我在build.gradle中创建了一个额外的任务来为公共github回购提供密钥。Travis CI编译在gradle任务中失败
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)
}
}}
我想与特拉维斯CI服务器端建立这个和在环境变量设置中添加这两个变量FABRIC_API_SECRET和FABRIC_API_KEY。
但构建失败,此例外。
配置项目':app'时发生问题。
在项目':app'上找不到属性'FABRIC_API_SECRET'。
任何想法我该如何解决这个...?
非常感谢!!!!这解决了我的问题:) – eddykordo
很高兴能够帮助建立gradle文件 – griffio