LoginSignup
1
0

More than 3 years have passed since last update.

【メモ】Gradleのタスクを空実行して、実際に実行されるすべてのタスクを確認する方法

Posted at

例えばAndroid開発で、 app:assemble というタスクを実行した場合、実際に実行されるのは

app:preBuild
app:preDebugBuild
app:compileDebugAidl
...(その他いっぱい)

と色々なタスクが実行されるのですが、実行されるタスクを一覧で確認する方法はないのかと調べたメモです。

-m オプションを使って空実行すればOK

Gradle User Guide の 第11章 Gradleのコマンドラインを使う11.7. 空実行 に記載されていました。

確認したいタスクに -m を追加して実行すればOKです。
(上記のページには記載がないですが --dry-run でもOKです。)

試しに ./gradlew app:assemble -m を実行してみると…

:app:preBuild SKIPPED
:app:preDebugBuild SKIPPED
:app:compileDebugAidl SKIPPED
:app:compileDebugRenderscript SKIPPED
...

という感じですべてを確認することが出来ました。 :smile:

1
0
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
1
0