Skip to content

Instantly share code, notes, and snippets.

Last active Jan 5, 2022
What would you like to do?


A task represents atomic piece of work.

Take away

build.gradle.kts is known as build script.

Lifecycle tasks

They are composite of individual tasks.

  • clean
  • check
  • assemble produces artifacts/distro
  • build: build and distribute
  • build_Configuration_ task rule
  • clean_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:

Get status of Gradle daemon

$ ./gradelw --status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment