For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

kotlin

fun DependencyHandler.kotlin(module: String, version: String? = null): Any(source)

Builds the dependency notation for the named Kotlin module at the given version.

Parameters

module

simple name of the Kotlin module, for example "reflect".

version

optional desired version, unspecified if null.


Applies the given Kotlin plugin module.

For example: plugins { kotlin("jvm") version "2.4.21" }

Visit the plugin portal to see the list of available plugins.

Parameters

module

simple name of the Kotlin Gradle plugin module, for example "jvm", "android", "kapt", "plugin.allopen" etc...