Course map
Stage 1: Foundation
Stage 2: Intermediate
Stage 3: Advanced
Stage 4: DSA in Kotlin
Stage 5: Specialization

Part 11 / Topic 1 of 9

Why kotlinc alone isn't enough anymore

Every Stage 1 example was one file, compiled with one kotlinc command. That stops scaling the moment either of these becomes true:

  • The project has more than a handful of files that need organizing, not just compiling.
  • The project needs a dependency that isn't in the JDK or the Kotlin standard library — here, a test framework. kotlinc can compile against a .jar you already have on disk, but it has no idea how to go out and fetch one from Maven Central. Something else has to do that part.

That "something else" is a build tool. Gradle is the standard one for Kotlin projects — its own build files are themselves written in Kotlin (build.gradle.kts), which is a pleasant side effect of learning Kotlin first: you can actually read them. Gradle's job, in short: resolve dependencies, compile src/main then src/test against them, run the tests, and report the result — the same four steps you'll do by hand later in this part.

Done here? The practice set for Part 11 — including the solutions — is on the part page.

Search the guide