diff --git a/.teamcity/references/BuildApiPages.kt b/.teamcity/references/BuildApiPages.kt
index 177720071ba..6a1c99072a9 100644
--- a/.teamcity/references/BuildApiPages.kt
+++ b/.teamcity/references/BuildApiPages.kt
@@ -104,6 +104,7 @@ fun scriptBuildHtml(version: String? = null, init: GradleBuildStep.() -> Unit =
tasks = "dokkaHtmlMultiModule"
gradleParams = "${if (version != null) "-PdeployVersion=\"$version\" " else ""}--no-daemon --no-configuration-cache"
useGradleWrapper = true
+ jdkHome = "%env.JDK_17_0%"
}.apply(init)
fun copyDokkaApiResult(
diff --git a/docs/kr.tree b/docs/kr.tree
index ba767b2487f..6469cfc1499 100644
--- a/docs/kr.tree
+++ b/docs/kr.tree
@@ -21,155 +21,162 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -178,112 +185,102 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -293,49 +290,32 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -364,6 +344,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -377,29 +369,59 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/labels.list b/docs/labels.list
index 0d879d6eac7..cfae164e45d 100644
--- a/docs/labels.list
+++ b/docs/labels.list
@@ -9,6 +9,4 @@
The feature is in Beta. It is almost stable, but migration steps may be required in the future. We'll do our best to minimize any changes you have to make.
This functionality is available only in the latest EAP version.
-
- This functionality is available only in the latest EAP version.
\ No newline at end of file
diff --git a/docs/topics/arrays.md b/docs/topics/arrays.md
index 1f26cfdd6fa..c432b0f6413 100644
--- a/docs/topics/arrays.md
+++ b/docs/topics/arrays.md
@@ -380,5 +380,5 @@ fun main() {
## What's next?
* To learn more about why we recommend using collections for most use cases, read our [Collections overview](collections-overview.md).
-* Learn about other [basic types](basic-types.md).
+* Learn about other [basic types](types-overview.md).
* If you are a Java developer, read our Java to Kotlin migration guide for [Collections](java-to-kotlin-collections-guide.md).
diff --git a/docs/topics/basic-syntax.md b/docs/topics/basic-syntax.md
index 03e99eccaf8..1914d2be9c1 100644
--- a/docs/topics/basic-syntax.md
+++ b/docs/topics/basic-syntax.md
@@ -1,4 +1,4 @@
-[//]: # (title: Basic syntax)
+[//]: # (title: Basic syntax overview)
This is a collection of basic syntax elements with examples. At the end of every section, you'll find a link to
a detailed description of the related topic.
diff --git a/docs/topics/classes.md b/docs/topics/classes.md
index b43ffffdfdf..20e303911cd 100644
--- a/docs/topics/classes.md
+++ b/docs/topics/classes.md
@@ -1,5 +1,10 @@
[//]: # (title: Classes)
+> Before creating classes, consider using a [data class](data-classes.md) if the purpose is to store data.
+> Alternatively, think about extending an existing class with an [extension](extensions.md), rather than creating a new one from scratch.
+>
+{style="tip"}
+
Like other object-oriented languages, Kotlin uses _classes_ to encapsulate data (properties) and behavior (functions)
for reusable, structured code.
diff --git a/docs/topics/coding-conventions.md b/docs/topics/coding-conventions.md
index 528f1cafcde..ed01fd300c0 100644
--- a/docs/topics/coding-conventions.md
+++ b/docs/topics/coding-conventions.md
@@ -21,6 +21,10 @@ the given code style.
2. Switch on **Incorrect formatting** inspection.
Additional inspections that verify other issues described in the style guide (such as naming conventions) are enabled by default.
+
+
+For more information, see the [Migrate to Kotlin code style with IntelliJ IDEA](code-style-migration-guide.md) guide.
+
## Source code organization
### Directory structure
diff --git a/docs/topics/command-line.md b/docs/topics/command-line.md
index a068cceebe1..9b4fb9ca34f 100644
--- a/docs/topics/command-line.md
+++ b/docs/topics/command-line.md
@@ -156,3 +156,7 @@ kotlinc -script-templates org.example.CustomScriptDefinition -script custom.scri
```
For additional details, see the [KEEP-75](https://github.com/Kotlin/KEEP/blob/master/proposals/scripting-support.md).
+
+## What's next?
+
+[Create a console application based on Kotlin/JVM](jvm-get-started.md).
diff --git a/docs/topics/compatibility-guides/compatibility-guide-13.md b/docs/topics/compatibility-guides/compatibility-guide-13.md
index b54f15a3e1f..cd4a8f7fe39 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-13.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-13.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.3)
+[//]: # (title: Compatibility guide for Kotlin 1.3.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental
principles in Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed,
diff --git a/docs/topics/compatibility-guides/compatibility-guide-14.md b/docs/topics/compatibility-guides/compatibility-guide-14.md
index afd794b9af8..605e0a6a3d1 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-14.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-14.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.4)
+[//]: # (title: Compatibility guide for Kotlin 1.4.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental
principles in Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed,
diff --git a/docs/topics/compatibility-guides/compatibility-guide-15.md b/docs/topics/compatibility-guides/compatibility-guide-15.md
index 58c19665421..88d1e8a67fd 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-15.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-15.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.5)
+[//]: # (title: Compatibility guide for Kotlin 1.5.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental
principles in Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed,
diff --git a/docs/topics/compatibility-guides/compatibility-guide-16.md b/docs/topics/compatibility-guides/compatibility-guide-16.md
index 791bda60156..dae77ef66b6 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-16.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-16.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.6)
+[//]: # (title: Compatibility guide for Kotlin 1.6.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-guide-17.md b/docs/topics/compatibility-guides/compatibility-guide-17.md
index 16ab2106a89..a1f4f95753a 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-17.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-17.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.7)
+[//]: # (title: Compatibility guide for Kotlin 1.7.0)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-guide-18.md b/docs/topics/compatibility-guides/compatibility-guide-18.md
index 98fbf78b938..14795ab63b5 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-18.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-18.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.8)
+[//]: # (title: Compatibility guide for Kotlin 1.8.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-guide-19.md b/docs/topics/compatibility-guides/compatibility-guide-19.md
index 3b98ce15970..ab6328c7403 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-19.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-19.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 1.9)
+[//]: # (title: Compatibility guide for Kotlin 1.9.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-guide-20.md b/docs/topics/compatibility-guides/compatibility-guide-20.md
index 8c6a5de557f..37b03fdc1b4 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-20.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-20.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 2.0)
+[//]: # (title: Compatibility guide for Kotlin 2.0.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-guide-21.md b/docs/topics/compatibility-guides/compatibility-guide-21.md
index 3c1f63b3200..84b5df20fdf 100644
--- a/docs/topics/compatibility-guides/compatibility-guide-21.md
+++ b/docs/topics/compatibility-guides/compatibility-guide-21.md
@@ -1,4 +1,4 @@
-[//]: # (title: Compatibility guide for Kotlin 2.1)
+[//]: # (title: Compatibility guide for Kotlin 2.1.x)
_[Keeping the Language Modern](kotlin-evolution-principles.md)_ and _[Comfortable Updates](kotlin-evolution-principles.md)_ are among the fundamental principles in
Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the
diff --git a/docs/topics/compatibility-guides/compatibility-modes.md b/docs/topics/compatibility-guides/compatibility-modes.md
deleted file mode 100644
index 6a17525ddc1..00000000000
--- a/docs/topics/compatibility-guides/compatibility-modes.md
+++ /dev/null
@@ -1,8 +0,0 @@
-[//]: # (title: Compatibility modes)
-
-When a big team is migrating onto a new version, it may appear in an "inconsistent state" at some point, when some developers have already updated but others haven't. To prevent the former from writing and committing code that others may not be able to compile, we provide the following command line switches (also available in the IDE and [Gradle](gradle-compiler-options.md)/[Maven](maven.md#specify-compiler-options)):
-
-* `-language-version X.Y` - compatibility mode for Kotlin language version X.Y, reports errors for all language features that came out later.
-* `-api-version X.Y` - compatibility mode for Kotlin API version X.Y, reports errors for all code using newer APIs from the Kotlin Standard Library (including the code generated by the compiler).
-
-Currently, we support the development for at least three previous language and API versions in addition to the latest stable one.
diff --git a/docs/topics/competitive-programming.md b/docs/topics/competitive-programming.md
index 52648c8620e..7ae6191f43a 100644
--- a/docs/topics/competitive-programming.md
+++ b/docs/topics/competitive-programming.md
@@ -13,8 +13,8 @@ programming, Kotlin incidentally fits well in this domain, reducing the typical
programmer needs to write and read while working with the code almost to the level offered by dynamically-typed
scripting languages, while having tooling and performance of a statically-typed language.
-See [Get started with Kotlin/JVM](jvm-get-started.md) on how to set up development
-environment for Kotlin. In competitive programming, a single project is usually created and each problem's solution is
+For more information on how to create a Kotlin project in IntelliJ IDEA, see the [Create a console app](jvm-get-started.md)
+tutorial. In competitive programming, a single project is usually created and each problem's solution is
written in a single source file.
## Simple example: Reachable Numbers problem
diff --git a/docs/topics/gradle/gradle-configure-project.md b/docs/topics/gradle/gradle-configure-project.md
index 13b8c6ae96b..669ee5beaa1 100644
--- a/docs/topics/gradle/gradle-configure-project.md
+++ b/docs/topics/gradle/gradle-configure-project.md
@@ -549,8 +549,6 @@ Learn more about:
### Other details
-Learn more about [Kotlin/JVM](jvm-get-started.md).
-
#### Disable use of artifact in compilation task
In some rare scenarios, you can experience a build failure caused by a circular dependency error. For example, when you
diff --git a/docs/topics/gradle/gradle.md b/docs/topics/gradle/gradle.md
index e136b6be0a4..c7887c546dd 100644
--- a/docs/topics/gradle/gradle.md
+++ b/docs/topics/gradle/gradle.md
@@ -27,4 +27,4 @@ Learn about:
please refer to the [Dokka README](https://github.com/Kotlin/dokka/blob/master/README.md#using-the-gradle-plugin)
for configuration instructions. Dokka supports mixed-language projects and can generate output in multiple
formats, including standard Javadoc.
-* **OSGi**. For OSGi support see the [Kotlin OSGi page](kotlin-osgi.md).
+* **OSGi**. For OSGi support see the [Kotlin OSGi page](kotlin-osgi.md).
\ No newline at end of file
diff --git a/docs/topics/home.topic b/docs/topics/home.topic
index 946a30cc470..6cf77e20a86 100644
--- a/docs/topics/home.topic
+++ b/docs/topics/home.topic
@@ -32,7 +32,7 @@
What's new in Kotlin 2.2.20
Kotlin releases
Standard library API reference
- Basic types
+ Types overview
Collections
Coroutines
diff --git a/docs/topics/inheritance.md b/docs/topics/inheritance.md
index 97dd707b2e4..bcd56f5167f 100644
--- a/docs/topics/inheritance.md
+++ b/docs/topics/inheritance.md
@@ -1,5 +1,10 @@
[//]: # (title: Inheritance)
+> Before creating an inheritance hierarchy with classes, consider using [abstract classes](classes.md#abstract-classes) or [interfaces](interfaces.md).
+> You can inherit from abstract classes and interfaces by default. They are designed so that other classes can inherit their members amd implement them.
+>
+{style="tip"}
+
All classes in Kotlin have a common superclass, `Any`, which is the default superclass for a class with no supertypes declared:
```kotlin
diff --git a/docs/topics/jvm/comparison-to-java.md b/docs/topics/jvm/comparison-to-java.md
index 245aa4e8329..9a3a86cb4be 100644
--- a/docs/topics/jvm/comparison-to-java.md
+++ b/docs/topics/jvm/comparison-to-java.md
@@ -15,7 +15,7 @@ Kotlin fixes a series of issues that Java suffers from:
## What Java has that Kotlin does not
* [Checked exceptions](exceptions.md)
-* [Primitive types](basic-types.md) that are not classes. The byte-code uses primitives where possible, but they are not
+* [Primitive types](types-overview.md) that are not classes. The byte-code uses primitives where possible, but they are not
explicitly available.
* [Static members](classes.md) are replaced with [companion objects](object-declarations.md#companion-objects),
[top-level functions](functions.md), [extension functions](extensions.md#extension-functions), or [@JvmStatic](java-to-kotlin-interop.md#static-methods).
@@ -36,7 +36,7 @@ Kotlin fixes a series of issues that Java suffers from:
* [Properties](properties.md)
* [Primary constructors](classes.md)
* [First-class delegation](delegation.md)
-* [Type inference for variable and property types](basic-types.md) (**Java 10**: [Local-Variable Type Inference](https://openjdk.org/jeps/286))
+* [Type inference for variable and property types](types-overview.md) (**Java 10**: [Local-Variable Type Inference](https://openjdk.org/jeps/286))
* [Singletons](object-declarations.md)
* [Declaration-site variance & Type projections](generics.md)
* [Range expressions](ranges.md)
diff --git a/docs/topics/jvm/jvm-get-started.md b/docs/topics/jvm/jvm-get-started.md
index e435d2f2d5b..ae1a639a7ca 100644
--- a/docs/topics/jvm/jvm-get-started.md
+++ b/docs/topics/jvm/jvm-get-started.md
@@ -1,4 +1,4 @@
-[//]: # (title: Get started with Kotlin/JVM)
+[//]: # (title: Create a console app – tutorial)
This tutorial demonstrates how to use IntelliJ IDEA for creating a console application.
diff --git a/docs/topics/jvm/jvm-spring-boot-using-crudrepository.md b/docs/topics/jvm/jvm-spring-boot-using-crudrepository.md
index b4f8c9136ce..004a2398028 100644
--- a/docs/topics/jvm/jvm-spring-boot-using-crudrepository.md
+++ b/docs/topics/jvm/jvm-spring-boot-using-crudrepository.md
@@ -220,9 +220,6 @@ Get your personal language map to help you navigate Kotlin features and track yo
-* Learn more about [Calling Java from Kotlin code](java-interop.md) and [Calling Kotlin from Java code](java-to-kotlin-interop.md).
-* Learn how to convert existing Java code to Kotlin with the [Java-to-Kotlin converter](mixing-java-kotlin-intellij.md#converting-an-existing-java-file-to-kotlin-with-j2k).
-* Check out our Java to Kotlin migration guides:
- * [Strings in Java and Kotlin](java-to-kotlin-idioms-strings.md).
- * [Collections in Java and Kotlin](java-to-kotlin-collections-guide.md).
- * [Nullability in Java and Kotlin](java-to-kotlin-nullability-guide.md).
+* Check out the [Spring Framework](https://docs.spring.io/spring-framework/docs/current/reference/html/languages.html#languages) documentation.
+* Complete the [Building web applications with Spring Boot and Kotlin](https://spring.io/guides/tutorials/spring-boot-kotlin) tutorial.
+* Create a chat application in the [Spring Boot with Kotlin Coroutines and RSocket](https://spring.io/guides/tutorials/spring-webflux-kotlin-rsocket/) tutorial.
diff --git a/docs/topics/jvm/jvm-test-using-junit.md b/docs/topics/jvm/jvm-test-using-junit.md
index 1f2b2f40a04..eb49e994d8d 100644
--- a/docs/topics/jvm/jvm-test-using-junit.md
+++ b/docs/topics/jvm/jvm-test-using-junit.md
@@ -1,4 +1,4 @@
-[//]: # (title: Test code using JUnit in JVM – tutorial)
+[//]: # (title: Test code using JUnit – tutorial)
This tutorial shows you how to write a simple unit test in a Kotlin/JVM project and run it with the Gradle build tool.
diff --git a/docs/topics/jvm/mixing-java-kotlin-intellij.md b/docs/topics/jvm/mixing-java-kotlin-intellij.md
index 4ec7dd42fa5..9a3d490555d 100644
--- a/docs/topics/jvm/mixing-java-kotlin-intellij.md
+++ b/docs/topics/jvm/mixing-java-kotlin-intellij.md
@@ -2,8 +2,7 @@
Kotlin provides the first-class interoperability with Java, and modern IDEs make it even better.
In this tutorial, you'll learn how to use both Kotlin and Java sources in the same project in
-IntelliJ IDEA. To learn how to start a new Kotlin project in IntelliJ IDEA,
-see [Getting started with IntelliJ IDEA](jvm-get-started.md).
+IntelliJ IDEA.
## Adding Java source code to an existing Kotlin project
diff --git a/docs/topics/kotlin-evolution-principles.md b/docs/topics/kotlin-evolution-principles.md
index a2e68ba942b..54b6bfa2bb4 100644
--- a/docs/topics/kotlin-evolution-principles.md
+++ b/docs/topics/kotlin-evolution-principles.md
@@ -209,14 +209,20 @@ and even when it's over and the change ships in a stable version, there's still
### Compatibility options
-We provide the `-language-version X.Y` and `-api-version X.Y` options that make a new version emulate the behavior of an old
-one for compatibility purposes. To give you more time for migration, we [support](compatibility-modes.md)
-the three previous language and API versions in addition to the latest stable one.
+We provide compatiblity options that make a new Kotlin version emulate the behavior of an old one for compatibility purposes:
+
+* `-language-version X.Y` - compatibility mode for Kotlin language version X.Y, reports errors for all language features
+ that came out later.
+* `-api-version X.Y` - compatibility mode for Kotlin API version X.Y, reports errors for all code using newer APIs from
+ the Kotlin Standard Library (including the code generated by the compiler).
+
+To give you more time for migration, we support the development for at least three previous language and API versions
+in addition to the latest stable one.
Actively maintained code bases can benefit from getting bug fixes as soon as possible, without waiting for a full deprecation cycle to complete.
Currently, such projects can enable the `-progressive` option and get such fixes enabled even in tooling releases.
-All options are available in the command line as well as in [Gradle](gradle-compiler-options.md) and in [Maven](maven.md#specify-compiler-options).
+All options are available in the IDE, command line, as well as in [Gradle](gradle-compiler-options.md) and in [Maven](maven.md#specify-compiler-options).
### Evolving the binary format
diff --git a/docs/topics/kotlin-ide.md b/docs/topics/kotlin-ide.md
index 941d45b45f5..1bc5006bbe0 100644
--- a/docs/topics/kotlin-ide.md
+++ b/docs/topics/kotlin-ide.md
@@ -58,5 +58,5 @@ Also, you could use package managers, such as [Homebrew](command-line.md#homebre
## What's next?
-* [Start your first project using IntelliJ IDEA IDE](jvm-get-started.md)
+* [Create a console application in IntelliJ IDEA](jvm-get-started.md)
* [Create your first cross-platform mobile app using Android Studio](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-create-first-app.html)
\ No newline at end of file
diff --git a/docs/topics/maven.md b/docs/topics/maven.md
index 1cf81ea96f0..494b1ef049f 100644
--- a/docs/topics/maven.md
+++ b/docs/topics/maven.md
@@ -382,4 +382,4 @@ your Maven project, see [Maven](dokka-maven.md).
## Enable OSGi support
-[Learn how to enable OSGi support in your Maven project](kotlin-osgi.md#maven).
+[Learn how to enable OSGi support in your Maven project](kotlin-osgi.md#maven).
\ No newline at end of file
diff --git a/docs/topics/null-safety.md b/docs/topics/null-safety.md
index de00a9ae91a..05edf8272d9 100644
--- a/docs/topics/null-safety.md
+++ b/docs/topics/null-safety.md
@@ -215,8 +215,9 @@ You can also place a safe call on the left side of an assignment:
person?.department?.head = managersPool.getManager()
```
-In the example above, if one of the receivers in the safe call chain is `null`, the assignment is skipped, and the expression on the right is not evaluated at all. For example, if either
-`person` or `person.department` is `null`, the function is not called. Here's the equivalent of the same safe call but with the `if` conditional:
+In the example above, if one of the receivers in the safe call chain is `null`, the assignment is skipped, and the
+expression on the right is not evaluated at all. For example, if either `person` or `person.department` is `null`, the
+function is not called. Here's the equivalent of the same safe call but with the `if` conditional:
```kotlin
if (person != null && person.department != null) {
@@ -247,6 +248,7 @@ Instead of writing the complete `if` expression, you can handle this in a more c
```kotlin
fun main() {
+
//sampleStart
// Assigns null to a nullable variable
val b: String? = null
@@ -259,6 +261,21 @@ fun main() {
```
{kotlin-runnable="true"}
+```kotlin
+fun main() {
+
+//sampleStart
+ // Assigns null to a nullable variable
+ val b: String? = null
+ // Checks for nullability. If not null, returns length. If null, returns a non-null value
+ val l = b?.length ?: 100
+ println(l)
+ // 0
+//sampleEnd
+}
+```
+{kotlin-runnable="true"}
+
If the expression to the left of `?:` is not `null`, the Elvis operator returns it. Otherwise, the Elvis operator returns the expression
to the right. The expression on the right-hand side is evaluated only if the left-hand side is `null`.
diff --git a/docs/topics/operator-overloading.md b/docs/topics/operator-overloading.md
index a129fd46650..036fb4d3eb1 100644
--- a/docs/topics/operator-overloading.md
+++ b/docs/topics/operator-overloading.md
@@ -38,7 +38,7 @@ function or an extension function.
* If the function is absent or ambiguous, it is a compilation error.
* If the function is present and its return type is `R`, the expression `+a` has type `R`.
-> These operations, as well as all the others, are optimized for [basic types](basic-types.md) and do not introduce
+> These operations, as well as all the others, are optimized for [basic types](types-overview.md) and do not introduce
> overhead of function calls for them.
>
{style="note"}
diff --git a/docs/topics/properties.md b/docs/topics/properties.md
index e581e9b05fc..059746a9d33 100644
--- a/docs/topics/properties.md
+++ b/docs/topics/properties.md
@@ -379,7 +379,7 @@ const val MAX_LOGIN_ATTEMPTS = 3
Compile-time constants must meet the following requirements:
* They must be either a top-level property, or a member of an [`object` declaration](object-declarations.md#object-declarations-overview) or a [companion object](object-declarations.md#companion-objects).
-* They must be initialized with a value of type `String` or a [primitive type](basic-types.md).
+* They must be initialized with a value of type `String` or a [primitive type](types-overview.md).
* They can't have a custom getter.
Compile-time constants still have a backing field, so you can interact with them using [reflection](reflection.md).
@@ -427,7 +427,7 @@ For class properties:
* You can't declare them in the primary constructor.
* They must not have a custom getter or setter.
-In all cases, the property or variable must be non-nullable and must not be a [primitive type](basic-types.md).
+In all cases, the property or variable must be non-nullable and must not be a [primitive type](types-overview.md).
If you access a `lateinit` property before initializing it, Kotlin throws a specific exception that identifies the uninitialized
property being accessed:
diff --git a/docs/topics/ranges.md b/docs/topics/ranges.md
index fd64f876419..dd359ccb6b7 100644
--- a/docs/topics/ranges.md
+++ b/docs/topics/ranges.md
@@ -77,7 +77,7 @@ fun main() {
```
{kotlin-runnable="true" kotlin-min-compiler-version="1.3" id="kotlin-ranges-step"}
-## Progression
+## Progressions
The ranges of integral types, such as `Int`, `Long`, and `Char`, can be treated as
[arithmetic progressions](https://en.wikipedia.org/wiki/Arithmetic_progression).
diff --git a/docs/topics/scope-functions.md b/docs/topics/scope-functions.md
index 2e4649bacaf..3467046ae8d 100644
--- a/docs/topics/scope-functions.md
+++ b/docs/topics/scope-functions.md
@@ -347,7 +347,7 @@ fun main() {
```
{kotlin-runnable="true" kotlin-min-compiler-version="1.3"}
-`let` is often used to execute a code block containing non-null values. To perform actions on a non-null object, use
+`let` is often used to execute a code block containing non-null values. To perform actions on a nullable object, use
the [safe call operator `?.`](null-safety.md#safe-call-operator) on it and call `let` with the actions in its lambda.
```kotlin
diff --git a/docs/topics/tour/kotlin-tour-basic-types.md b/docs/topics/tour/kotlin-tour-basic-types.md
index 2e649051536..4cf11520a62 100644
--- a/docs/topics/tour/kotlin-tour-basic-types.md
+++ b/docs/topics/tour/kotlin-tour-basic-types.md
@@ -55,7 +55,7 @@ In total, Kotlin has the following basic types:
| Characters | `Char` | `val separator: Char = ','` |
| Strings | `String` | `val message: String = "Hello, world!"` |
-For more information on basic types and their properties, see [Basic types](basic-types.md).
+For more information on basic types and their properties, see [Types overview](types-overview.md).
With this knowledge, you can declare variables and initialize them later. Kotlin can manage this as long as variables
are initialized before the first read.
diff --git a/docs/topics/tour/kotlin-tour-functions.md b/docs/topics/tour/kotlin-tour-functions.md
index a39eece72ac..dfd24ac6195 100644
--- a/docs/topics/tour/kotlin-tour-functions.md
+++ b/docs/topics/tour/kotlin-tour-functions.md
@@ -218,11 +218,17 @@ fun main() {
Write a function called `circleArea` that takes the radius of a circle in integer format as a parameter and outputs the
area of that circle.
-> In this exercise, you import a package so that you can access the value of pi via `PI`. For more information about
+> In this exercise, you import a package so that you can access the value of via `PI`. For more information about
> importing packages, see [Packages and imports](packages.md).
>
{style="tip"}
+
+
+ The formula for calculating the area of a circle is , where is the radius.
+
+
+
|---|---|
```kotlin
import kotlin.math.PI
diff --git a/docs/topics/basic-types.md b/docs/topics/types-overview.md
similarity index 96%
rename from docs/topics/basic-types.md
rename to docs/topics/types-overview.md
index 6d49cbb1397..7076cd0832d 100644
--- a/docs/topics/basic-types.md
+++ b/docs/topics/types-overview.md
@@ -1,4 +1,4 @@
-[//]: # (title: Basic types)
+[//]: # (title: Types overview)
In Kotlin, everything is an object in the sense that you can call member functions and properties on any variable.
While certain types have an optimized internal representation as primitive values at runtime (such as numbers, characters, and booleans),
diff --git a/docs/topics/whatsnew/whatsnew-eap.md b/docs/topics/whatsnew/whatsnew-eap.md
index 64661deaea4..50164caba74 100644
--- a/docs/topics/whatsnew/whatsnew-eap.md
+++ b/docs/topics/whatsnew/whatsnew-eap.md
@@ -1,5 +1,7 @@
[//]: # (title: What's new in Kotlin %kotlinEapVersion%)
+
+
_[Released: %kotlinEapReleaseDate%](eap.md#build-details)_
> This document doesn't cover all of the features of the Early Access Preview (EAP) release,
diff --git a/docs/topics/whatsnew/whatsnew17.md b/docs/topics/whatsnew/whatsnew17.md
index 203a9ef77e7..6746779821a 100644
--- a/docs/topics/whatsnew/whatsnew17.md
+++ b/docs/topics/whatsnew/whatsnew17.md
@@ -521,7 +521,7 @@ language and API versions.
With Kotlin 1.7.0, we're supporting three previous language and API versions rather than two. This means Kotlin 1.7.0
supports the development of libraries targeting Kotlin versions down to 1.4.0. For more information on backward
-compatibility, see [Compatibility modes](compatibility-modes.md).
+compatibility, see [Compatibility options](kotlin-evolution-principles.md#compatibility-options).
### Access to annotations via reflection
diff --git a/docs/topics/whatsnew/whatsnew1720.md b/docs/topics/whatsnew/whatsnew1720.md
index 17262292a65..3b38e6c6d5c 100644
--- a/docs/topics/whatsnew/whatsnew1720.md
+++ b/docs/topics/whatsnew/whatsnew1720.md
@@ -735,7 +735,7 @@ Since the previous release, the Kotlin documentation has received some notable c
### Revamped and improved pages
-* [Basic types overview](basic-types.md) – learn about the basic types used in Kotlin: numbers, Booleans, characters, strings, arrays, and unsigned integer numbers.
+* [Basic types overview](types-overview.md) – learn about the basic types used in Kotlin: numbers, Booleans, characters, strings, arrays, and unsigned integer numbers.
* [IDEs for Kotlin development](kotlin-ide.md) – see the list of IDEs with official Kotlin support and tools that have community-supported plugins.
### New articles in the Kotlin Multiplatform journal
diff --git a/docs/topics/whatsnew/whatsnew2220.md b/docs/topics/whatsnew/whatsnew2220.md
index 6622cfcaee7..12f5233c665 100644
--- a/docs/topics/whatsnew/whatsnew2220.md
+++ b/docs/topics/whatsnew/whatsnew2220.md
@@ -1238,6 +1238,67 @@ the previous version of the lambda, which could cause unexpected behavior.
In Kotlin 2.2.20, the compiler now detects changes in lambdas of inline functions and automatically recompiles their call sites.
+### Improvements for library publication
+
+Kotlin 2.2.20 adds new Gradle tasks that make library publication easier. These tasks help you generate key pairs, upload
+public keys, and run local checks to ensure the verification process succeeds before uploading to the Maven Central repository.
+
+For more information about how to use these tasks as part of the publication process, see [Publish your library to Maven Central](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-publish-libraries.html).
+
+#### New Gradle tasks for generating and uploading PGP keys
+
+Before Kotlin 2.2.20, if you wanted to publish a multiplatform library to the Maven Central repository, you had to install
+a third-party program like `gpg` to generate a key pair for signing your publications. Now, the Kotlin Gradle plugin comes
+with Gradle tasks that let you generate a key pair and upload the public key so you don't have to install another program.
+
+##### Generate a key pair
+
+The `generatePgpKeys` task generates a key pair. When you run it, you must provide a password for the private keystore
+and your name in the following format:
+
+```bash
+./gradlew -Psigning.password=example-password generatePgpKeys --name "John Smith "
+```
+
+The task stores the key pair in the `build/pgp` directory.
+
+> Move your key pair to a secure location to prevent accidental deletion or unauthorized access.
+>
+{style="warning"}
+
+##### Upload the public key
+
+The `uploadPublicPgpKey` task uploads the public key to Ubuntu's key server: `keyserver.ubuntu.com`. When you run it,
+provide the path to the public key in `.asc` format:
+
+```bash
+./gradlew uploadPublicPgpKey --keyring /path_to/build/pgp/public_KEY_ID.asc
+```
+
+#### New Gradle tasks to test verification locally
+
+Kotlin 2.2.20 also adds Gradle tasks for testing verification locally before uploading your library to the Maven Central repository.
+
+If you're using the Kotlin Gradle plugin along with Gradle's [Signing Plugin](https://docs.gradle.org/current/userguide/signing_plugin.html) and [Maven Publish Plugin](https://docs.gradle.org/current/userguide/publishing_maven.html), you can run the `checkSigningConfiguration` and `checkPomFileForPublication` tasks to verify that your setup meets Maven Central’s requirements. Replace `` with the name of your publication.
+
+These tasks aren't automatically run as part of the `build` or `check` Gradle tasks, so you need to run them manually.
+For example, if you have a `KotlinMultiplatform` publication:
+
+```bash
+./gradlew checkSigningConfiguration checkPomFileForKotlinMultiplatformPublication
+```
+
+The `checkSigningConfiguration` task checks that:
+
+* The Signing Plugin has keys configured.
+* The configured public key has been uploaded to either `keyserver.ubuntu.com` or `keys.openpgp.org` key servers.
+* All publications have signing enabled.
+
+If any of these checks fail, the task returns an error with information on how to fix the issue.
+
+The `checkPomFileForPublication` task checks whether the `pom.xml` file meets Maven Central's [requirements](https://central.sonatype.org/publish/requirements/#required-pom-metadata).
+If it doesn't, the task returns an error with details about which parts of the `pom.xml` file are non-compliant.
+
## Maven: Support for the Kotlin daemon in the `kotlin-maven-plugin`
Kotlin 2.2.20 takes the [build tools API introduced in Kotlin 2.2.0](whatsnew22.md#new-experimental-build-tools-api) one