A task represents atomic piece of work.
build.gradle.kts
is known as build script.
They are composite of individual tasks.
clean
check
assemble
produces artifacts/distrobuild
: build and distributebuild_Configuration_
task ruleclean_Task_
task rule
A gradle build is composed of phases
- Initialization
- from settings.gradle.kts
- Configuration
- build DAG of tasks
- Execution
$ ./gradlew bar
this is executing from settings.gradle.kts in initialization phase
> Configure project :
this is executing from build.gradle.kts in configuration phase
registered task in? bar
> Task :bar
done lastly
afterEvaluate
runs after project is configured but before it is executed.
source: https://stackoverflow.com/questions/16070567/difference-between-gradles-terms-evaluation-and-execution
$ ./gradelw --status