8
9

More than 5 years have passed since last update.

Deploygateにgradleからアップロードする際に、メッセージをコンソールから指定する

Posted at

Gradle徹底入門 次世代ビルドツールによる自動化基盤の構築
を読んでたら、やっとgradleのプロジェクトに引数渡す方法が分かった。(gradleのヘルプ読め)

build.gradle
deploygate {
    userName = "shikajiro"
    token = "hogehoge"

    apks {
        release {
            sourceFile = file("build/outputs/apk/app-release.apk")
            message = deploygateMsg
        }
        debug {
            sourceFile = file("build/outputs/apk/app-debug.apk")
            message = deploygateMsg
        }
    }
}

deploygateMsg を変数として扱う感じですね。ただ、これだけだとsyncとかbuildすると「deploygateMsgなんてねぇよ」エラーがでちゃう。とりあえずプロパティに空定義しておく。

gradle.properties
deploygateMsg

あとはコマンドで実行。

./gradlew uploadDeployGate -PdeploygateMsg="ここにメッセージ"

動いた!

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9