Skip to content

Commit 090e7c5

Browse files
authored
Merge branch 'master' into autotests_for_kotlin_user_groups
2 parents 77eb043 + 3b41910 commit 090e7c5

File tree

57 files changed

+251
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+251
-48
lines changed

.teamcity/kotlinlang/builds/BuildReferenceDocs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object BuildReferenceDocs : BuildType({
2424
""".trimIndent()
2525

2626
params {
27-
param("WEBHELP_FRONTEND_VERSION", "6.22.0-fix-mermaid")
27+
param("WEBHELP_FRONTEND_VERSION", "6.24.0-api-nav")
2828
param("WH_DOCS_PATH_REGEX", "docs")
2929
param("WH_PROJECT_NAME", "kotlin-reference")
3030
}

docs/cfg/buildprofiles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
https://kotlinlang.org/assets/images/apple-touch-icon-114x114.png?v2,
3737
https://kotlinlang.org/assets/images/apple-touch-icon-144x144.png?v2
3838
</custom-favicons>
39+
<external-links-in-new-tab>false</external-links-in-new-tab>
3940
</variables>
4041
<build-profile instance="kr"/>
4142
</buildprofiles>

docs/images/social/github.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/kr.tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@
283283
<toc-element toc-title="Ktor" href="https://ktor.io/"/>
284284
</toc-element>
285285
<toc-element toc-title="API reference">
286+
<toc-element toc-title="Overview" topic="api-references.topic"/>
286287
<toc-element toc-title="Standard library (stdlib)" href="https://kotlinlang.org/api/latest/jvm/stdlib/"/>
287288
<toc-element toc-title="Test library (kotlin.test)" href="https://kotlinlang.org/api/latest/kotlin.test/"/>
288289
<toc-element toc-title="Coroutines (kotlinx.coroutines)" href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/"/>

docs/topics/api-references.topic

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE topic SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
3+
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
5+
id="api-references" title="API references">
6+
7+
<p>Welcome to the Kotlin API References page. Here you'll find links to the API documentation for the official Kotlin libraries and tools.</p>
8+
9+
<list columns="2">
10+
<li>
11+
<a href="https://kotlinlang.org/api/core/kotlin-stdlib/"><b>Standard library (stdlib)</b></a>
12+
<br/>
13+
<p>The Kotlin Standard library provides core functionality for Kotlin programming, including essential APIs such as collections, text and string processing, ranges, sequences, and more. It extends platform-specific APIs and provides a Kotlin-first API for working with them.</p>
14+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/JetBrains/kotlin">kotlin</a>
15+
<br/>
16+
</li>
17+
<li>
18+
<a href="https://kotlinlang.org/api/core/kotlin-test/"><b>Test library (kotlin.test)</b></a>
19+
<br/>
20+
<p>A multiplatform testing library that provides common testing annotations and utility functions. It supports integration with popular test frameworks on each platform and offers a unified testing experience across the Kotlin ecosystem.</p>
21+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/JetBrains/kotlin">kotlin</a>
22+
<br/>
23+
</li>
24+
<li>
25+
<a href="https://kotlinlang.org/api/kotlinx.coroutines/"><b>Coroutines (kotlinx.coroutines)</b></a>
26+
<br/>
27+
<p>A powerful library for asynchronous programming using Kotlin coroutines. It offers tools to support structured concurrency, asynchronous streams, synchronization primitives like mutexes and semaphores, testing, and more.</p>
28+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/Kotlin/kotlinx.coroutines">kotlinx.coroutines</a>
29+
<br/>
30+
</li>
31+
<li>
32+
<a href="https://kotlinlang.org/api/kotlinx.serialization/"><b>Serialization (kotlinx.serialization)</b></a>
33+
<br/>
34+
<p>A multiplatform serialization library. It provides a type-safe, compile-time mechanism for converting Kotlin objects to and from a variety of formats such as JSON, CBOR, and Protocol Buffers.</p>
35+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/Kotlin/kotlinx.serialization">kotlinx.serialization</a>
36+
<br/>
37+
</li>
38+
<li>
39+
<a href="https://kotlinlang.org/api/kotlinx-io/"><b>Kotlin I/O library (kotlinx-io)</b></a>
40+
<br/>
41+
<p>A multiplatform library for low-level I/O operations. It defines abstractions for reading from and writing to binary streams and buffers, designed to be efficient and portable across all Kotlin platforms.</p>
42+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/Kotlin/kotlinx-io">kotlinx-io</a>
43+
<br/>
44+
</li>
45+
<li>
46+
<a href="https://kotlinlang.org/api/kotlinx-datetime/"><b>Date and time (kotlinx-datetime)</b></a>
47+
<br/>
48+
<p>A multiplatform library for calendar-based computations. It provides representations of date values and supports timezone-specific operations.</p>
49+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/Kotlin/kotlinx-datetime">kotlinx-datetime</a>
50+
<br/>
51+
</li>
52+
<li>
53+
<a href="https://kotlinlang.org/api/kotlinx-metadata-jvm/"><b>JVM Metadata (kotlin-metadata-jvm)</b></a>
54+
<br/>
55+
<p>A library for reading and writing Kotlin metadata stored in JVM class files. It is primarily used by tools such as annotation processors, static analyzers, and compiler plugins.</p>
56+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/JetBrains/kotlin/tree/master/libraries/kotlinx-metadata">kotlinx-metadata</a>
57+
<br/>
58+
</li>
59+
<li>
60+
<a href="https://kotlinlang.org/api/kotlin-gradle-plugin/"><b>Kotlin Gradle plugins (kotlin-gradle-plugin)</b></a>
61+
<br/>
62+
<p>The Kotlin Gradle plugins for compiling, testing, and packaging Kotlin code. These plugins simplify JVM and multiplatform builds, manage dependencies, and integrate with IDEs and CI systems.</p>
63+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/JetBrains/kotlin/tree/master/libraries/tools/kotlin-gradle-plugin">kotlin-gradle-plugin</a>
64+
<br/>
65+
</li>
66+
<li>
67+
<a href="https://api.ktor.io/"><b>Ktor</b></a>
68+
<br/>
69+
<p>A framework for building asynchronous clients and servers in connected systems using Kotlin. Ktor is designed for scalability and flexibility and is deeply integrated with coroutines for non-blocking I/O and structured concurrency.</p>
70+
<img src="github.svg" width="18" alt="GitHub"/> <a href="https://github.com/ktorio/ktor">ktor</a>
71+
<br/>
72+
</li>
73+
</list>
74+
</topic>

docs/topics/command-line.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ library in it.
8686
java -jar hello.jar
8787
```
8888

89+
> To compile a Kotlin/Native application, use the [Kotlin/Native compiler](native-get-started.md#using-the-command-line-compiler).
90+
>
91+
{style="note"}
92+
8993
## Compile a library
9094

9195
If you're developing a library to be used by other Kotlin applications, you can build the **.jar** file without including
@@ -106,6 +110,10 @@ kotlin -classpath hello.jar HelloKt
106110

107111
`HelloKt` is the main class name that the Kotlin compiler generates for the file named `hello.kt`.
108112

113+
> To compile a Kotlin/Native library, use the [Kotlin/Native compiler](native-libraries.md#kotlin-compiler-specifics).
114+
>
115+
{style="note"}
116+
109117
## Run the REPL
110118

111119
Run the compiler with the [`-Xrepl` compiler option](compiler-reference.md#xrepl) to have an interactive shell. In this shell, you can type any valid Kotlin code

docs/topics/eap.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,14 @@ In this channel, you can also get notifications about new EAP builds.
6161
<p>For more details, please refer to the <a href="https://github.com/JetBrains/kotlin/releases/tag/v2.2.20-Beta1">changelog</a> or <a href="whatsnew-eap.md">What's new in Kotlin 2.2.20-Beta1</a>.</p>
6262
</td>
6363
</tr>
64+
<tr>
65+
<td><strong>2.2.10-RC</strong>
66+
<p>Released: <strong>July 18, 2025</strong></p>
67+
<p><a href="https://github.com/JetBrains/kotlin/releases/tag/v2.2.10-RC" target="_blank">Release on GitHub</a></p>
68+
</td>
69+
<td>
70+
<p>A bug fix release for Kotlin 2.2.0.</p>
71+
<p>For more details, please refer to the <a href="https://github.com/JetBrains/kotlin/releases/tag/v2.2.10-RC">changelog</a>.</p>
72+
</td>
73+
</tr>
6474
</table>

docs/topics/jvm/java-to-kotlin-interop.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ fun emptyList(): List<Nothing> = listOf()
586586
// List emptyList() { ... }
587587
```
588588

589-
### Inline value classes
589+
## Inline value classes
590590

591591
<primary-label ref="experimental-general"/>
592592

@@ -639,3 +639,29 @@ MyInt output = ExampleKt.timesTwoBoxed(input);
639639

640640
To apply this behavior to all inline value classes and the functions that use them within a module, compile it with the `-Xjvm-expose-boxed` option.
641641
Compiling with this option has the same effect as if every declaration in the module has the `@JvmExposeBoxed` annotation.
642+
643+
### Inherited functions
644+
645+
The `@JvmExposeBoxed` annotation doesn't automatically generate boxed representations for inherited functions.
646+
647+
To generate the necessary representation for an inherited function, override it in the implementing or extending class:
648+
649+
```kotlin
650+
interface IdTransformer {
651+
fun transformId(rawId: UInt): UInt = rawId
652+
}
653+
654+
// Doesn't generate a boxed representation for the transformId() function
655+
@OptIn(ExperimentalStdlibApi::class)
656+
@JvmExposeBoxed
657+
class LightweightTransformer : IdTransformer
658+
659+
// Generates a boxed representation for the transformId() function
660+
@OptIn(ExperimentalStdlibApi::class)
661+
@JvmExposeBoxed
662+
class DefaultTransformer : IdTransformer {
663+
override fun transformId(rawId: UInt): UInt = super.transformId(rawId)
664+
}
665+
```
666+
667+
To learn how inheritance works in Kotlin and how to call superclass implementations using the `super` keyword, see [Inheritance](inheritance.md#calling-the-superclass-implementation).

docs/topics/native/native-get-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@ In this section, you'll learn how to create a Kotlin/Native application using th
311311

312312
To install the compiler:
313313

314-
1. Go to the Kotlin's [GitHub releases](%kotlinLatestUrl%) page.
314+
1. Go to the Kotlin's [GitHub releases](%kotlinLatestUrl%) page and scroll down to the **Assets** section.
315315
2. Look for a file with `kotlin-native` in the name and download one that is suitable for your operating system,
316-
for example `kotlin-native-prebuilt-linux-x86_64-2.0.21.tar.gz`.
316+
for example `kotlin-native-prebuilt-linux-x86_64-%kotlinVersion%.tar.gz`.
317317
3. Unpack the archive to a directory of your choice.
318318
4. Open your shell profile and add the path to the compiler's `/bin` directory to the `PATH` environment variable:
319319

docs/topics/releases.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ new features before they are released. See [Early Access Preview](eap.md) for de
3131

3232
## Update to a new Kotlin version
3333

34-
To upgrade your project to a new release, you need to update your build script file.
35-
For example, to update to Kotlin %kotlinVersion%, change the version of the Kotlin Gradle plugin in your
34+
To upgrade your project to a new release, update the Kotlin version in your build system.
35+
36+
### Gradle
37+
38+
To update to Kotlin %kotlinVersion%, change the version of the Kotlin Gradle plugin in your
3639
`build.gradle(.kts)` file:
3740

3841
<tabs group="build-script">
@@ -66,10 +69,43 @@ plugins {
6669
</tab>
6770
</tabs>
6871

69-
If you have projects created with earlier Kotlin versions, change the Kotlin version in your projects and update kotlinx
70-
libraries if necessary.
72+
If you have projects created with earlier Kotlin versions, check if you also need to [update the version of any kotlinx
73+
libraries](gradle-configure-project.md#set-a-dependency-on-a-kotlinx-library).
74+
75+
If you are migrating to a new language release, the Kotlin plugin's migration tools will help you with the process.
76+
77+
> To learn more about how to work with Gradle in your project, see [Configure a Gradle project](gradle-configure-project.md).
78+
>
79+
{style="tip"}
80+
81+
### Maven
82+
83+
To update to Kotlin %kotlinVersion%, change the version in your `pom.xml` file:
7184

72-
If you are migrating to the new language release, Kotlin plugin's migration tools will help you with the migration.
85+
```xml
86+
<properties>
87+
<kotlin.version>%kotlinVersion%</kotlin.version>
88+
</properties>
89+
```
90+
91+
Alternatively, you can change the version of the `kotlin-maven-plugin` in your `pom.xml` file:
92+
93+
```xml
94+
<plugins>
95+
<plugin>
96+
<groupId>org.jetbrains.kotlin</groupId>
97+
<artifactId>kotlin-maven-plugin</artifactId>
98+
<version>%kotlinVersion%</version>
99+
</plugin>
100+
</plugins>
101+
```
102+
103+
If you have projects created with earlier Kotlin versions, check if you also need to [update the version of any kotlinx
104+
libraries](maven.md#set-dependencies).
105+
106+
> To learn more about how to work with Maven in your project, see [Maven](maven.md).
107+
>
108+
{style="tip"}
73109

74110
## IDE support
75111

0 commit comments

Comments
 (0)