# The Four Kotlin Versions in a Gradle Project

DevFeed: [The Four Kotlin Versions in a Gradle Project](<https://devfeed.tech/articles/the-four-kotlin-versions-in-a-gradle-project-24698.md>)

Original publisher: [Read original article](<https://blog.gradle.org/three-kotlin-versions-in-a-gradle-project>)

Author: Laura Kassovic

Published: 2026-06-12T04:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-compiler](<https://devfeed.tech/tags/kotlin-compiler.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

## AI overview

This article explains the four Kotlin versions that can matter in a Gradle project: the Kotlin compiler version selected through the Kotlin Gradle Plugin, the language version targeted for project code, the Kotlin compiler bundled with Gradle for build logic, and the language version Gradle pins for that build logic.

## Source excerpt

Do you know what version of Kotlin your Gradle build is using? There are four Kotlin versions you need to know about in a project built with Gradle. They're easy to mix up, and mixing them up can lead to some confusion (and the occasional compiler error). The trick is that there are really only two compilers in play, and each one carries its own language-version dial. Two compilers, two dials, four numbers. Let's take them one at a time. This post was updated on June 16, 2026. 1. The Kotlin that compiles your code This is the version most people look for. If your application or library code is written in Kotlin and gets compiled by the Kotlin Gradle Plugin, you pick its version in your build: // build.gradle.kts plugins { kotlin("jvm") version "1.9.25" } Change the KGP version, and you change the Kotlin compiler used to compile your project. This is the version you control directly. 2. The Kotlin language version for your code Picking the KGP version chooses which compiler runs over your code. But that compiler has a second dial: the language version, which decides what Kotlin syntax it will accept. You set it through KGP: // build.gradle.kts kotlin { compilerOptions { languageVersion = KotlinVersion.KOTLIN_1_8 } } By default it matches the language version associated with your KGP version, so most projects never touch it. You can pin it lower, for example to keep a library compilable by projects still on an older Kotlin. #1 is the compiler; this is the language level you ask that compiler to target. 3. The Kotlin embedded in Gradle (that compiles your build logic) Now the other compiler. Gradle ships its own Kotlin compiler and standard library inside the distribution. It's the compiler that builds your Kotlin DSL scripts and Gradle-managed build logic, and its standard library is available on the classpath used by build scripts and plugins. You never declare this one. It comes bundled with whatever Gradle version you use. In Gradle 9.6.0: # gradle/wrapper/gradle-w