What are the differences between gradle assemble and gradle build tasks? Ask Question

What are the differences between gradle assemble and gradle build tasks? Ask Question

If I am not wrong gradle assemble does run gradle assembleDebug and gradle assembleRelease, but I believe gradle build also does the same, so what are the different between them both?

ベストアンサー1

assemble will build your artifacts, and build will assemble your artifacts with additional checks.

build depends on assemble, so build is sort of a superset of assemble

You can have a look on the tasks that will be executed by using the --dry-run flag. e.g.

gradlew build --dry-run

You will see that apart from assemble also lint and test will be executed.

おすすめ記事