Skip to content

Commit

Permalink
chore: minor updates (JetBrains#3369)
Browse files Browse the repository at this point in the history
Co-authored-by: Victoria Petrakovich <[email protected]>
  • Loading branch information
danil-pavlov and PetrakovichVictoria authored Jan 9, 2023
1 parent ea8e431 commit 0192e7a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/kr.tree
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<toc-element id="multiplatform-run-tests.md" toc-title="Running tests" accepts-web-file-names="mpp-run-tests.html"/>
<toc-element toc-title="Artifact compilation">
<toc-element id="multiplatform-configure-compilations.md" accepts-web-file-names="mpp-configure-compilations.html"/>
<toc-element id="multiplatform-native-artifacts.md"/>
<toc-element toc-title="[Experimental DSL] Build final native binaries" id="multiplatform-native-artifacts.md"/>
<toc-element id="multiplatform-build-native-binaries.md" accepts-web-file-names="mpp-build-native-binaries.html"/>
</toc-element>
<toc-element id="multiplatform-dsl-reference.md" accepts-web-file-names="mpp-dsl-reference.html,mpp-supported-platforms.html,multiplatform-supported-platforms.html"/>
Expand Down
17 changes: 10 additions & 7 deletions docs/topics/gradle/gradle-compilation-and-caches.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ There are three compiler execution strategies:

| Strategy | Where Kotlin compiler is executed | Incremental compilation | Other characteristics and notes |
|----------------|--------------------------------------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Daemon | Inside its own daemon process | Yes | *The default and fastest strategy*. Can be shared between different Gradle daemons and multiple parallel compilations. |
| Daemon | Inside its own daemon process | Yes | _The default and fastest strategy_. Can be shared between different Gradle daemons and multiple parallel compilations. |
| In process | Inside the Gradle daemon process | No | May share the heap with the Gradle daemon. The "In process" execution strategy is _slower_ than the "Daemon" execution strategy. Each [worker](https://docs.gradle.org/current/userguide/worker_api.html) creates a separate Kotlin compiler classloader for each compilation. |
| Out of process | In a separate process for each compilation | No | The slowest execution strategy. Similar to the "In process", but additionally creates a separate Java process within a Gradle worker for each compilation. |

Expand Down Expand Up @@ -355,7 +355,7 @@ There are two common cases that analyzing build reports for long-running compila
save separate classes in different files, refactor large classes, declare top-level functions in different files, and so on.

Learn [how to read build reports](https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/#how_to_read_build_reports)
and [how build JetBrains uses build reports](https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/#how_we_use_build_reports_in_jetbrains).
and [how JetBrains uses build reports](https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/#how_we_use_build_reports_in_jetbrains).

### Enabling build reports

Expand Down Expand Up @@ -401,12 +401,13 @@ kotlin.build.report.label=some_label
### Limit of custom values

To collect build scans' statistics, Kotlin build reports use [Gradle's custom values](https://docs.gradle.com/enterprise/tutorials/extending-build-scans/).
Different Gradle plugins and you can also write data to custom values. The number of custom values has a limit.
See the current maximum custom value count in the [Build scan plugin docs](https://docs.gradle.com/enterprise/gradle-plugin/#adding_custom_values).
Both you and different Gradle plugins can write data to custom values. The number of custom values has a limit.
See the current maximum custom value count in the [Build scan plugin docs](https://docs.gradle.com/enterprise/gradle-plugin/#adding_custom_values).

If you have a big project, a number of such custom values may be quite big. If this number exceeds the limit,
you can see the following message in the logs:

```
```text
Maximum number of custom values (1,000) exceeded
```

Expand All @@ -420,8 +421,10 @@ kotlin.build.report.build_scan.custom_values_limit=500

HTTP build statistic logs can contain some project and system properties. These properties can change builds' behavior,
so it's useful to log them in build statistics.
These properties can store sensitive data, for example, passwords or a project's full path.
You can turn on this behavior by adding the `kotlin.build.report.http.verbose_environment` property to your `gradle.properties`.
These properties can store sensitive data, for example, passwords or a project's full path.

You can disable collection of these statistics by adding the `kotlin.build.report.http.verbose_environment` property to
your `gradle.properties`.

> JetBrains doesn't collect these statistics. You choose a place [where to store your reports](#enabling-build-reports).
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ This is a curated list of Kotlin Multiplatform Mobile samples.
<td>-</td>
<td>✅</td>
<td>
<p>Target list:</p>
<list>
<li>Android Wear OS</li>
<li>iOS</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[//]: # (title: Build Kotlin/Native artifacts)
[//]: # (title: Build final native binaries (Experimental DSL))

> The new DSL described below is [Experimental](components-stability.md). It may be changed at any time.
> We encourage you to use it for evaluation purposes.
Expand Down
48 changes: 24 additions & 24 deletions docs/topics/whatsnew18.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The Kotlin 1.8.0 release is out and here are some of its biggest highlights:

The Kotlin plugin that supports 1.8.0 is available for:

| IDE | Supported versions |
|---------------|------------------------------------|
| IntelliJ IDEA | 2021.3, 2022.1, 2022.2 |
| IDE | Supported versions |
|----------------|------------------------------------|
| IntelliJ IDEA | 2021.3, 2022.1, 2022.2 |
| Android Studio | Electric Eel (221), Flamingo (222) |

> You can update your projects to Kotlin 1.8.0 in IntelliJ IDEA 2022.3 without updating the IDE plugin.
Expand Down Expand Up @@ -127,7 +127,7 @@ To make Kotlin more interoperable with Objective-C and Swift, three new annotati
replacing a Kotlin declaration with a wrapper written in Swift.

The annotation instructs the Kotlin compiler to mark a function or property as `swift_private` in the generated
Objective-C API. Such declarations get the `**` prefix, which makes them invisible to Swift code.
Objective-C API. Such declarations get the `__` prefix, which makes them invisible to Swift code.

You can still use these declarations in your Swift code to create a Swift-friendly API, but they won't be suggested
by Xcode's autocompletion, for example.
Expand Down Expand Up @@ -184,44 +184,44 @@ Here are some of the key differences between the two layouts:

#### KotlinSourceSet naming schema

| Current source set layout | New source set layout |
|----------------------------------------|---------------------------------|
| `targetName` + `AndroidSourceSet.name` | targetName + AndroidVariantType |
| Current source set layout | New source set layout |
|----------------------------------------|-------------------------------------|
| `targetName` + `AndroidSourceSet.name` | `targetName` + `AndroidVariantType` |

`{AndroidSourceSet.name}` maps to `{KotlinSourceSet.name}` as follows:

| `AndroidSourceSet.name` | `KotlinSourceSet.name` in current source set layout | `KotlinSourceSet.name` in new source set layout |
|-------------------------|-----------------------------------------------------|-------------------------------------------------|
| main | androidMain | androidMain |
| test | androidTest | android<b>Unit</b>Test |
| androidTest | android<b>Android</b>Test | android<b>Instrumented</b>Test |
| | Current source set layout | New source set layout |
|-------------|---------------------------|--------------------------------|
| main | androidMain | androidMain |
| test | androidTest | android<b>Unit</b>Test |
| androidTest | android<b>Android</b>Test | android<b>Instrumented</b>Test |

#### SourceDirectories

| Current source set layout | New source set layout |
|---------------------------------------------------------|---------------------------------------------------------------------------|
| The layout adds additional `/kotlin` SourceDirectories | `src/{AndroidSourceSet.name}/kotlin`, `src/{KotlinSourceSet.name}/kotlin` |

`{AndroidSourceSet.name}` maps to `{Source Directories included}` as follows:
`{AndroidSourceSet.name}` maps to `{SourceDirectories included}` as follows:

| `AndroidSourceSet.name` | `{Source Directories included}` in current source set layout | `{Source Directories included}` in new source set layout |
|-------------------------|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| main | src/androidMain/kotlin, src/main/kotlin, src/main/java | src/androidMain/kotlin, src/main/kotlin, src/main/java |
| test | src/androidTest/kotlin, src/test/kotlin, src/test/java | src/android<b>Unit</b>Test/kotlin, src/test/kotlin, src/test/java |
| androidTest | src/android<b>Android</b>Test/kotlin, src/<b>androidTest</b>/java | src/android<b>Instrumented</b>Test/kotlin, src/<b>androidTest</b>/java, src/<b>androidTest</b>/kotlin |
| | Current source set layout | New source set layout |
|-------------|------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| main | src/androidMain/kotlin, src/main/kotlin, src/main/java | src/androidMain/kotlin, src/main/kotlin, src/main/java |
| test | src/androidTest/kotlin, src/test/kotlin, src/test/java | src/android<b>Unit</b>Test/kotlin, src/test/kotlin, src/test/java |
| androidTest | src/android<b>Android</b>Test/kotlin, src/androidTest/java | src/android<b>Instrumented</b>Test/kotlin, src/androidTest/java, <b>src/androidTest/kotlin</b> |

#### The location of the `AndroidManifest.xml` file

| Current source set layout | New source set layout |
|--------------------------------------------------------|-------------------------------------------------------|
| src/{<b>AndroidSourceSet</b>.name}/AndroidManifest.xml | src/{<b>KotlinSourceSet</b>.name}/AndroidManifest.xml |
| src/{<b>Android</b>SourceSet.name}/AndroidManifest.xml | src/{<b>Kotlin</b>SourceSet.name}/AndroidManifest.xml |

`{AndroidSourceSet.name}` maps to`{AndroidManifest.xml location}` as follows:

| `AndroidSourceSet.name` | `{AndroidManifest.xml location}` in current source set layout | `{AndroidManifest.xml location}` in new source set layout |
|-------------------------|---------------------------------------------------------------|-----------------------------------------------------------|
| main | src/main/AndroidManifest.xml | src/<b>android</b>Main/AndroidManifest.xml |
| debug | src/debug/AndroidManifest.xml | src/<b>android</b>Debug/AndroidManifest.xml |
| | Current source set layout | New source set layout |
|-------|-------------------------------|---------------------------------------------|
| main | src/main/AndroidManifest.xml | src/<b>android</b>Main/AndroidManifest.xml |
| debug | src/debug/AndroidManifest.xml | src/<b>android</b>Debug/AndroidManifest.xml |

### Configuration and setup

Expand All @@ -231,7 +231,7 @@ The new layout will become the default in future releases. You can enable it now
kotlin.mpp.androidSourceSetLayoutVersion=2
```

> The new layout requires Android Gradle plugin 7.0 or later and is supported in Android Studio > 2022.3 and later.
> The new layout requires Android Gradle plugin 7.0 or later and is supported in Android Studio 2022.3 and later.
>
{type="note"}

Expand Down

0 comments on commit 0192e7a

Please sign in to comment.