kaakaa Blog

この世は極楽 空にはとんぼ

compare-gradle-buildsプラグインについて

Gradle in ActionやGradle徹底入門で紹介されてて気になったので触って見てる。

checkstyleの設定ファイルが違った時にどのぐらいチェック結果が変わるのかを見れるかと思ったが、現在のバージョンだとZipアーカイブの比較しか出来ないっぽい。

Chapter 64. Comparing Builds

64.2.2. Supported build outcomes

Only support for comparing build outcomes that are zip archives is supported at this time. This includes jar, war and ear archives.

Future versions will provide support for comparing outcomes such as test execution (i.e. which tests were executed, which tests failed, etc.)

今後に期待。

しかし、GradleないしGroovyは今後大丈夫だろうか。。。
Groovy 2.4 And Grails 3.0 To Be Last Major Releases Under Pivotal Sponsorship | Pivotal P.O.V.


ちなみに、compare-gradle-buildsプラグインでの比較時にデフォルトで実行されるのは

gradle clean assemble

だが、実行するタスクを変更するにはホストに下記のようなbuild.gradleを書けば良い。

apply plugin: 'compare-gradle-builds'

compareGradleBuilds {
        sourceBuild {
                projectDir "Hoge"
                tasks = ["hoge","check"]
        }
        targetBuild {
                projectDir "Fuga"
                tasks = ["check"]
        }
}