Gradle for Kotlin
Learn the JVM build system with the Kotlin DSL: build.gradle.kts, the Kotlin plugin, the kotlin{} extension, dependencies, repositories, tasks, version catalogs and multi-module builds — with annotated examples and a quiz per lesson.
- Step 1
What Is Gradle and Why Kotlin Uses It
Build automation, dependency management, tasks, and the wrapper that make Kotlin projects reproducible.
Read lesson - Step 2
The Gradle Kotlin DSL: build.gradle.kts
Type-safe, IDE-autocompleted builds that replace the old Groovy build.gradle.
Read lesson - Step 3
Applying the Kotlin Gradle Plugin
One line in plugins {} turns a plain Gradle build into a Kotlin/JVM project.
Read lesson - Step 4
Configuring the kotlin {} Extension: Toolchains and Compiler Options
Pin a JDK with jvmToolchain, shape bytecode with compilerOptions, and make every build reproducible.
Read lesson - Step 5
Declaring Dependencies: implementation, api, compileOnly, runtimeOnly & testImplementation
Pick the right configuration so your build stays fast and your API stays clean.
Read lesson - Step 6
Repositories, Dependency Coordinates & the BOM Platform
Where Gradle looks for libraries, how to name them, and how to align versions with a BOM.
Read lesson - Step 7
Gradle Tasks: Built-ins, ./gradlew, and Custom Tasks
Every Gradle build is a graph of tasks — learn to run them and write your own.
Read lesson - Step 8
Version Catalogs: One Source of Truth for Dependencies
Centralize every version, library, plugin, and bundle in gradle/libs.versions.toml and reference them type-safely as libs.xxx.
Read lesson - Step 9
Multi-Module Builds: Splitting, Wiring, and Sharing Config
Compose a Gradle build from independent modules and stop copy-pasting configuration.
Read lesson