0
私はbuild.gradleで公開githubリポジトリの秘密鍵を提供するために余分なタスクを作成しました。GravisタスクでTravis CIビルドに失敗しました
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