Gradle
All articles
About the course
Gradle reads a build script written in Groovy or Kotlin, works out which tasks have to run and in which order, and runs them: it compiles the code, runs the tests, writes the jar, publishes it to a repository. The course below is a chain of numbered lessons: each one takes a piece of the tool, shows the file it lives in, runs the commands and prints what they printed. Read them in order; every lesson names the one before it and the one after it.
Every command was run in this container with Gradle 9.9.2 on Java 21.0.13, with no network: the builds resolve their dependencies from the local Maven repository, and a lesson that needs a remote repository shows the failure it gets instead of pretending it works. The commands carry --offline --no-daemon --console=plain, which is how the image runs a build. Gradle prints two lines about its single-use daemon before every build here and a build time after it; the output blocks are excerpts and leave those lines out, the task lines stay as printed. Your times differ.
The Maven course covers the other build tool of the JVM, and one lesson of this course runs both of them on the same project.
Related
- Groovy: the language of the build scripts and the toolchain Gradle is written in.
- Java: the language the Java lessons of this course build, with its own course and install guides.
- JUnit 5: the test framework the test lessons use.
- Maven: the other build tool, with the same course shape, so the two can be compared.
- DevOps: the section this page belongs to.