Open-Source Wikis

/

Kotlin

/

Reference

/

Configuration

JetBrains/kotlin

Configuration

Build-, runtime-, and editor-level configuration files in this repository.

Build configuration

File Purpose
gradle.properties JDK selection, bootstrap version pin, build flags. Supported environment variables for JDK paths are documented at the top.
settings.gradle.kts Module enumeration and included builds. ~52 KB of hand-written DSL.
build.gradle.kts Cross-cutting subproject configuration. ~50 KB of DSL.
gradle/verification-metadata.xml Dependency hashes (md5 + sha256). One of the most-modified files in the recent history.
gradle/libs.versions.toml Gradle version catalog.
gradle/cacheRedirector.settings.gradle.kts Dependency redirector config.
intellij.yaml Pin for the bundled IntelliJ Platform components (intellij-core, idea-full).
repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/common-configuration.gradle.kts The cross-subproject "common" configuration plugin.
repo/gradle-settings-conventions/ Settings-level convention plugins.

Common Gradle properties:

Property Purpose
-Pteamcity=true Turn on TeamCity-style behavior (proguard, jar compression). Local builds skip both.
-Pkotlin.native.enabled=true Include Kotlin/Native targets in resolution and tests.
-Porg.gradle.java.installations.auto-detect=false Disable Gradle's JDK auto-detection (use only env-var-supplied JDKs).
-Pkotlin.test.update.test.data=true Update snapshot test data files in place.

Common environment variables:

Variable Purpose
JAVA_HOME Default JDK.
JDK_8, JDK_11, JDK_17, JDK_21, ... Per-version JDK paths. See gradle.properties for the full list.
KOTLIN_DAEMON_JVM_OPTIONS JVM args for the compile daemon.
KOTLIN_DAEMON_IDLE_TIMEOUT How long an idle daemon survives before exiting.

Compiler arguments

Compiler arguments are defined in compiler/arguments/ and exposed via:

  • compiler/arguments/resources/kotlin-compiler-arguments.json — single source of truth for argument names, types, defaults, and help text.
  • compiler/arguments/src/.../*CompilerArguments.kt — Kotlin data classes for each compiler family (common, JVM, JS, Native, Metadata).
  • Per-target generated impls under compiler/build-tools/kotlin-build-tools-impl/gen/.../arguments/.

Argument descriptions are heavily churning files — adding a new flag means editing the description, regenerating, updating BTAPI impls, and updating .api dumps.

CODEOWNERS

The CODEOWNERS file is at .space/CODEOWNERS and uses JetBrains Space CODEOWNERS syntax. Directives:

  • SPACE_OWNER: "<team>" — assigns a team owner.
  • USER_OWNER: <email> <github_username> — assigns an individual.
  • SPACE_TO_GITHUB_OWNER — maps a Space team to GitHub usernames.
  • GITHUB_BRANCH_RULE — per-branch overrides.
  • UNKNOWN, NO_OWNER — explicitly unowned paths.

Validated at build time by org.jetbrains.kotlin.code.SpaceCodeOwnersTest.

Editor configuration

File Scope
.editorconfig (root) Top-level Kotlin/Java sources.
kotlin-native/.editorconfig Native subtree (C/C++ + Kotlin).
kotlin-native/.clang-format C/C++ formatting in Native.
.idea/codeStyles/ IntelliJ code-style profiles.

AI agent configuration

The repo ships configuration for several AI coding assistants:

  • AGENTS.md (root and per-area) — primary agent guideline document.
  • CLAUDE.md (root and per-area) — Claude-specific. Mostly references AGENTS.md.
  • .ai/guidelines.md — canonical guideline file referenced by the others.
  • .junie/ — JetBrains Junie agent config.
  • .claude/local.md — user-local Claude preferences (gitignored).

These files name-check JetBrains MCP tools as the preferred means of file IO inside the project; they're for engineers working with AI assistants on the codebase.

License

Apache License 2.0. Full text and per-file headers in license/. License headers on .kt and .java files are checked by a Gradle test task; new sources must include the header.

Issue tracker

YouTrack: https://youtrack.jetbrains.com/issues/KT. Commit messages reference issues as KT-XXXXX. The body trailer ^KT-XXXXX Fixed auto-closes an issue. There is no GitHub issues equivalent for this repository — all bug reports go to YouTrack.

CI

TeamCity: https://teamcity.jetbrains.com/project.html?projectId=Kotlin. The CI configuration is stored in .teamcity/ (Kotlin DSL).

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Configuration – Kotlin wiki | Factory