Skip to content

Instantly share code, notes, and snippets.

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

Task

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: https://stackoverflow.com/questions/16070567/difference-between-gradles-terms-evaluation-and-execution

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