Skip to content

Commit 372f557

Browse files
authored
Merge pull request #4756 from JetBrains/2-1-20-doc-update
feat: Kotlin 2.1.20 release
2 parents 6fad2ed + dd57693 commit 372f557

Some content is hidden

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

42 files changed

+724
-161
lines changed

data/releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
url: https://github.com/JetBrains/kotlin/releases
22

33
latest:
4-
version: 2.1.10
5-
url: https://github.com/JetBrains/kotlin/releases/tag/v2.1.10
4+
version: 2.1.20
5+
url: https://github.com/JetBrains/kotlin/releases/tag/v2.1.20
-88.7 KB
Loading

docs/kr.tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
<toc-element topic="competitive-programming.md"/>
2424
</toc-element>
2525
<toc-element toc-title="What's new in Kotlin">
26-
<toc-element toc-title="Kotlin 2.1.0" accepts-web-file-names="whatsnew.html" topic="whatsnew21.md"/>
27-
<toc-element toc-title="Kotlin 2.1.20-RC3" topic="whatsnew-eap.md"/>
26+
<toc-element toc-title="Kotlin 2.1.20" accepts-web-file-names="whatsnew.html" topic="whatsnew2120.md"/>
27+
<toc-element toc-title="Kotlin 2.1.0" topic="whatsnew21.md"/>
28+
<toc-element toc-title="Kotlin 2.1.20-RC3" topic="whatsnew-eap.md" hidden="true"/>
2829
<toc-element toc-title="Earlier versions">
2930
<toc-element toc-title="Kotlin 2.0.20" topic="whatsnew2020.md"/>
3031
<toc-element toc-title="Kotlin 2.0.0" topic="whatsnew20.md"/>

docs/topics/configure-build-for-eap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[//]: # (title: Configure your build for EAP)
22

33
<tldr>
4-
<!-- <p>No preview versions are currently available</p> -->
5-
<p>Latest Kotlin EAP release: <strong>%kotlinEapVersion%</strong></p>
4+
<p>No preview versions are currently available</p>
5+
<!-- <p>Latest Kotlin EAP release: <strong>%kotlinEapVersion%</strong></p> -->
66
<p><a href="eap.md#build-details">Explore Kotlin EAP release details</a></p>
77
</tldr>
88

@@ -152,4 +152,4 @@ In the sample Maven project definition, replace `KOTLIN-EAP-VERSION` with the ac
152152

153153
* Report an issue to [our issue tracker, YouTrack](https://kotl.in/issue).
154154
* Find help in the [#eap channel in Kotlin Slack](https://app.slack.com/client/T09229ZC6/C0KLZSCHF) ([get an invite](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)).
155-
* Roll back to the latest stable version: [change it in your build script file](configure-build-for-eap.md#adjust-the-kotlin-version).
155+
* Roll back to the latest stable version: [change it in your build script file](#adjust-the-kotlin-version).

docs/topics/eap.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[//]: # (title: Participate in the Kotlin Early Access Preview)
22

3+
<!--
34
<tldr>
45
<p>Latest Kotlin EAP release: <strong>%kotlinEapVersion%</strong></p>
56
</tldr>
7+
-->
68

79
You can participate in the Kotlin Early Access Preview (EAP) to try out the latest Kotlin features before they are released.
810

@@ -35,8 +37,9 @@ In this channel, you can also get notifications about new EAP builds.
3537

3638
## Build details
3739

38-
<!-- _No preview versions are currently available._ -->
40+
_No preview versions are currently available._
3941

42+
<!--
4043
<table>
4144
<tr>
4245
<th>Build info</th>
@@ -52,4 +55,5 @@ In this channel, you can also get notifications about new EAP builds.
5255
<p>For more details, please refer to the <a href="https://github.com/JetBrains/kotlin/releases/tag/v2.1.20-RC3">changelog</a> or <a href="whatsnew-eap.md">What's new in Kotlin 2.1.20-RC3</a>.</p>
5356
</td>
5457
</tr>
55-
</table>
58+
</table>
59+
-->

docs/topics/gradle/gradle-configure-project.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,24 @@ plugins {
4848
When configuring your project, check the Kotlin Gradle plugin (KGP) compatibility with available Gradle versions.
4949
In the following table, there are the minimum and maximum **fully supported** versions of Gradle and Android Gradle plugin (AGP):
5050

51-
| KGP version | Gradle min and max versions | AGP min and max versions |
52-
|---------------|----------------------------------------|-----------------------------------------------------|
53-
| 2.1.0 | %minGradleVersion%–%maxGradleVersion%* | %minAndroidGradleVersion%–%maxAndroidGradleVersion% |
54-
| 2.0.20–2.0.21 | 6.8.3–8.8* | 7.1.3–8.5 |
55-
| 2.0.0 | 6.8.3–8.5 | 7.1.3–8.3.1 |
56-
| 1.9.20–1.9.25 | 6.8.3–8.1.1 | 4.2.2–8.1.0 |
57-
| 1.9.0–1.9.10 | 6.8.3–7.6.0 | 4.2.2–7.4.0 |
58-
| 1.8.20–1.8.22 | 6.8.3–7.6.0 | 4.1.3–7.4.0 |
59-
| 1.8.0–1.8.11 | 6.8.3–7.3.3 | 4.1.3–7.2.1 |
60-
| 1.7.20–1.7.22 | 6.7.1–7.1.1 | 3.6.4–7.0.4 |
61-
| 1.7.0–1.7.10 | 6.7.1–7.0.2 | 3.4.3–7.0.2 |
62-
| 1.6.20–1.6.21 | 6.1.1–7.0.2 | 3.4.3–7.0.2 |
63-
64-
> *Kotlin 2.0.20–2.0.21 and Kotlin 2.1.0 are fully compatible with Gradle up to 8.6.
51+
| KGP version | Gradle min and max versions | AGP min and max versions |
52+
|---------------|---------------------------------------|-----------------------------------------------------|
53+
| 2.1.20 | %minGradleVersion%–%maxGradleVersion% | %minAndroidGradleVersion%–%maxAndroidGradleVersion% |
54+
| 2.1.0–2.1.10 | 7.6.3–8.10* | 7.3.1–8.7.2 |
55+
| 2.0.20–2.0.21 | 6.8.3–8.8* | 7.1.3–8.5 |
56+
| 2.0.0 | 6.8.3–8.5 | 7.1.3–8.3.1 |
57+
| 1.9.20–1.9.25 | 6.8.3–8.1.1 | 4.2.2–8.1.0 |
58+
| 1.9.0–1.9.10 | 6.8.3–7.6.0 | 4.2.2–7.4.0 |
59+
| 1.8.20–1.8.22 | 6.8.3–7.6.0 | 4.1.3–7.4.0 |
60+
| 1.8.0–1.8.11 | 6.8.3–7.3.3 | 4.1.3–7.2.1 |
61+
| 1.7.20–1.7.22 | 6.7.1–7.1.1 | 3.6.4–7.0.4 |
62+
| 1.7.0–1.7.10 | 6.7.1–7.0.2 | 3.4.3–7.0.2 |
63+
| 1.6.20–1.6.21 | 6.1.1–7.0.2 | 3.4.3–7.0.2 |
64+
65+
> *Kotlin 2.0.20–2.0.21 and Kotlin 2.1.0–2.1.10 are fully compatible with Gradle up to 8.6.
6566
> Gradle versions 8.7–8.10 are also supported, with only one exception: If you use the Kotlin Multiplatform Gradle plugin,
66-
> you may see deprecation warnings in your multiplatform projects calling the [`withJava()` function in the JVM target](multiplatform-dsl-reference.md#jvm-targets).
67-
> For more information, see the issue in [YouTrack](https://youtrack.jetbrains.com/issue/KT-66542/Gradle-JVM-target-with-withJava-produces-a-deprecation-warning).
67+
> you may see deprecation warnings in your multiplatform projects calling the `withJava()` function in the JVM target.
68+
> For more information, see [Java source sets created by default](multiplatform-compatibility-guide.md#java-source-sets-created-by-default).
6869
>
6970
{style="warning"}
7071

docs/topics/gradle/gradle-plugin-variants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Currently, there are the following variants of the Kotlin Gradle plugin:
1616
| Variant's name | Corresponding Gradle versions |
1717
|----------------|-------------------------------|
1818
| `main` | 7.6.0–7.6.3 |
19-
| `gradle80` | 8.0 |
19+
| `gradle80` | 8.0–8.0.2 |
2020
| `gradle81` | 8.1.1 |
2121
| `gradle82` | 8.2.1–8.4 |
2222
| `gradle85` | 8.5 and higher |

docs/topics/home.topic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<misc>
3030
<cards narrow="false">
3131
<title>Featured topics</title>
32-
<a href="whatsnew21.md" summary="New language features and other updates">What's new in Kotlin 2.1.0</a>
32+
<a href="whatsnew2120.md" summary="New experimental features, performance improvements, and bug fixes">What's new in Kotlin 2.1.20</a>
3333
<a href="releases.md" summary="The latest Kotlin releases and instructions on how to update to them">Kotlin releases</a>
3434
<a href="https://kotlinlang.org/api/latest/jvm/stdlib/" summary="Living essentials for everyday work with Kotlin: IO, files, threading, collections, and much more">Standard library API reference</a>
3535
<a href="basic-types.md" summary="Kotlin type system: numbers, strings, arrays, and other built-in types">Basic types</a>

docs/topics/js/js-project-setup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,33 +272,33 @@ Once an npm dependency is installed, you can use its API in your code as describ
272272

273273
## run task
274274

275-
The Kotlin Multiplatform Gradle plugin provides a `jsRun` task that lets you run pure Kotlin/JS projects without additional configuration.
275+
The Kotlin Multiplatform Gradle plugin provides a `jsBrowserDevelopmentRun` task that lets you run pure Kotlin/JS projects without additional configuration.
276276

277277
For running Kotlin/JS projects in the browser, this task is an alias for the `browserDevelopmentRun` task (which is also
278278
available in Kotlin multiplatform projects). It uses the [webpack-dev-server](https://webpack.js.org/configuration/dev-server/)
279279
to serve your JavaScript artifacts.
280280
If you want to customize the configuration used by `webpack-dev-server`, for example, adjust the port the server runs on,
281281
use the [webpack configuration file](#webpack-bundling).
282282

283-
For running Kotlin/JS projects targeting Node.js, use the `jsRun` task that is an alias for the `nodeRun` task.
283+
For running Kotlin/JS projects targeting Node.js, use the `jsBrowserDevelopmentRun` task that is an alias for the `nodeRun` task.
284284

285-
To run a project, execute the standard lifecycle `jsRun` task, or the alias to which it corresponds:
285+
To run a project, execute the standard lifecycle `jsBrowserDevelopmentRun` task, or the alias to which it corresponds:
286286

287287
```bash
288-
./gradlew jsRun
288+
./gradlew jsBrowserDevelopmentRun
289289
```
290290

291291
To automatically trigger a re-build of your application after making changes to the source files, use the Gradle
292292
[continuous build](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:continuous_build) feature:
293293

294294
```bash
295-
./gradlew jsRun --continuous
295+
./gradlew jsBrowserDevelopmentRun --continuous
296296
```
297297

298298
or
299299

300300
```bash
301-
./gradlew jsRun -t
301+
./gradlew jsBrowserDevelopmentRun -t
302302
```
303303

304304
Once the build of your project has succeeded, the `webpack-dev-server` will automatically refresh the browser page.

docs/topics/js/running-kotlin-js.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Depending on the target platform, some platform-specific extra setup might be re
1414

1515
## Run the Node.js target
1616

17-
When targeting Node.js with Kotlin/JS, you can simply execute the `jsRun` Gradle task. This can be done for example via the
17+
When targeting Node.js with Kotlin/JS, you can simply execute the `jsBrowserDevelopmentRun` Gradle task. This can be done for example via the
1818
command line, using the Gradle wrapper:
1919

2020
```bash
21-
./gradlew jsRun
21+
./gradlew jsBrowserDevelopmentRun
2222
```
2323

24-
If you're using IntelliJ IDEA, you can find the `jsRun` action in the Gradle tool window:
24+
If you're using IntelliJ IDEA, you can find the `jsBrowserDevelopmentRun` action in the Gradle tool window:
2525

2626
![Gradle Run task in IntelliJ IDEA](run-gradle-task.png){width=700}
2727

@@ -57,10 +57,10 @@ After making these adjustments, start the integrated development server. You can
5757
Gradle wrapper:
5858

5959
```bash
60-
./gradlew jsRun
60+
./gradlew jsBrowserDevelopmentRun
6161
```
6262

63-
When working from IntelliJ IDEA, you can find the `jsRun` action in the Gradle tool window.
63+
When working from IntelliJ IDEA, you can find the `jsBrowserDevelopmentRun` action in the Gradle tool window.
6464

6565
After the project has been built, the embedded `webpack-dev-server` will start running, and will open a (seemingly empty)
6666
browser window pointing to the HTML file you specified previously. To validate that your program is running correctly,

docs/topics/kotlin-language-features-and-proposals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,10 @@ guided by pragmatic design.
336336

337337
<!-- the first td element should have the width="200" attribute -->
338338

339-
<tr filter="in-preview">
339+
<tr filter="stable">
340340
<td>
341341

342-
**In preview**
342+
**Stable**
343343

344344
</td>
345345
<td>

docs/topics/ksp/ksp-multiplatform.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,20 @@ plugins {
1414
}
1515

1616
kotlin {
17-
jvm {
18-
withJava()
19-
}
20-
linuxX64() {
17+
jvm()
18+
linuxX64 {
2119
binaries {
2220
executable()
2321
}
2422
}
25-
sourceSets {
26-
val commonMain by getting
27-
val linuxX64Main by getting
28-
val linuxX64Test by getting
29-
}
3023
}
3124

3225
dependencies {
3326
add("kspCommonMainMetadata", project(":test-processor"))
3427
add("kspJvm", project(":test-processor"))
3528
add("kspJvmTest", project(":test-processor")) // Not doing anything because there's no test source set for JVM
3629
// There is no processing for the Linux x64 main source set, because kspLinuxX64 isn't specified
37-
add("kspLinuxX64Test", project(":test-processor"))
30+
// add("kspLinuxX64Test", project(":test-processor"))
3831
}
3932
```
4033

docs/topics/lombok.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ Learn more about [how to configure the Lombok compiler plugin](#using-the-lombok
1919

2020
The plugin supports the following annotations:
2121
* `@Getter`, `@Setter`
22-
* `@Builder`
22+
* `@Builder`, `@SuperBuilder`
2323
* `@NoArgsConstructor`, `@RequiredArgsConstructor`, and `@AllArgsConstructor`
2424
* `@Data`
2525
* `@With`
2626
* `@Value`
2727

2828
We're continuing to work on this plugin. To find out the detailed current state, visit the [Lombok compiler plugin's README](https://github.com/JetBrains/kotlin/tree/master/plugins/lombok).
2929

30-
Currently, we don't have plans to support the `@SuperBuilder` and `@Tolerate` annotations. However, we can consider this if you vote
31-
for [@SuperBuilder](https://youtrack.jetbrains.com/issue/KT-53563/Kotlin-Lombok-Support-SuperBuilder) and
32-
[@Tolerate](https://youtrack.jetbrains.com/issue/KT-53564/Kotlin-Lombok-Support-Tolerate) in YouTrack.
30+
Currently, we don't have plans to support the `@Tolerate` annotation. However, we can consider this if you vote
31+
for the [@Tolerate issue](https://youtrack.jetbrains.com/issue/KT-53564/Kotlin-Lombok-Support-Tolerate) in YouTrack.
3332

3433
> Kotlin compiler ignores Lombok annotations if you use them in Kotlin code.
3534
>
@@ -45,7 +44,7 @@ Apply the `kotlin-plugin-lombok` Gradle plugin in the `build.gradle(.kts)` file:
4544
```kotlin
4645
plugins {
4746
kotlin("plugin.lombok") version "%kotlinVersion%"
48-
id("io.freefair.lombok") version "8.10"
47+
id("io.freefair.lombok") version "%lombokVersion%"
4948
}
5049
```
5150

@@ -55,7 +54,7 @@ plugins {
5554
```groovy
5655
plugins {
5756
id 'org.jetbrains.kotlin.plugin.lombok' version '%kotlinVersion%'
58-
id 'io.freefair.lombok' version '8.10'
57+
id 'io.freefair.lombok' version '%lombokVersion%'
5958
}
6059
```
6160

0 commit comments

Comments
 (0)