You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/topics/whatsnew21.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1249,16 +1249,20 @@ You can use the `KotlinAndroidExtension` in exactly the same way.
1249
1249
1250
1250
### Compiler symbols hidden from the Kotlin Gradle plugin API
1251
1251
1252
-
Starting with Kotlin 2.1.0,
1253
-
you will receive a warning if you access compiler module symbols bundled within the Kotlin Gradle plugin (KGP).
1254
-
Previously, the KGP included `org.jetbrains.kotlin:kotlin-compiler-embeddable` in its runtime dependencies,
1255
-
making internal compiler symbols, such as `KotlinCompilerVersion`, available in the build script classpath.
1252
+
Previously, KGP included `org.jetbrains.kotlin:kotlin-compiler-embeddable` in its runtime dependencies,
1253
+
making internal compiler symbols available in the build script classpath.
1254
+
These symbols were intended for internal use only.
1256
1255
1257
-
These symbols are intended for internal use only.
1258
-
Access to them will be removed in upcoming Kotlin releases to prevent compatibility issues and simplify KGP maintenance.
1259
-
If your build logic relies on any compiler symbols,
1260
-
you need to update it and use the [Gradle Workers API](https://docs.gradle.org/current/userguide/worker_api.html)
1261
-
with classloader or process isolation to ensure safe interaction with the compiler.
1256
+
Starting with Kotlin 2.1.0, KGP bundles a subset of `org.jetbrains.kotlin:kotlin-compiler-embeddable` class files in its JAR file and progressively removes them.
1257
+
This change aims to prevent compatibility issues and simplify KGP maintenance.
1258
+
1259
+
If other parts of your build logic, such as plugins like `kotlinter`, depend on a different version of `org.jetbrains.kotlin:kotlin-compiler-embeddable`
1260
+
than the one bundled with KGP, it can lead to conflicts and runtime exceptions.
1261
+
1262
+
To prevent such issues, KGP now shows a warning if `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath alongside KGP.
1263
+
1264
+
As a long-term solution, if you're a plugin author using `org.jetbrains.kotlin:kotlin-compiler-embeddable` classes, we recommend running them in an isolated classloader.
1265
+
For example, you can achieve it using the [Gradle Workers API](https://docs.gradle.org/current/userguide/worker_api.html) with classloader or process isolation.
1262
1266
1263
1267
#### Using the Gradle Workers API
1264
1268
@@ -1597,4 +1601,4 @@ Starting from IntelliJ IDEA 2023.3 and Android Studio Iguana (2023.2.1) Canary 1
1597
1601
bundled plugin included in your IDE. This means that you can't install the plugin from JetBrains Marketplace anymore.
1598
1602
1599
1603
To update to the new Kotlin version, [change the Kotlin version](releases.md#update-to-a-new-kotlin-version)
0 commit comments