In this case script definition is saved into script info,
but only real script definitions should be cached
In case of null script configurations will be reloaded into cache when scriptdefinitions will be ready
^KT-39910 Fixed
For example in case when script contains some errors gradleHome might be null
Then build root should be marked as updated
Also notification should be updated
Before this commit "delegate to Gradle" option was not taken into
consideration. Was it MPP or SPP, KotlinRunConfiguration was always
executed by platform runner (as a default one). The reason behind this
was that there was no dedicated class (extension point) responsible for
Gradle-Kotlin pair. Now its KotlinGradleAppEnvProvider.
The reason of resource directory absence was that it couldn't be loaded
from the project configuration file. Just after the import it remained
in the memory and runner couldn' get it. KotlinOutputPathsDataService as
a pair to KotlinOutputPaths is what was missing. Details are provided
below.
------------------------------------------------------------------------
On a disk configuration represents a binary file containing serialized
graph of external project structure. It contains nodes belonging to both
IDEA and its plugins.
To deserialize a node IDEA tries to load its class using a chain of
class-loaders: its own and those provided by actual set of plugins.
The nuance is how to get plugins' ones. The approach is the following.
There is an association between a node's payload and a service which is
supposed to consume it see KotlinOutputPathsDataService#getTargetDataKey
and DataNode#getKey). Plugin services are guaranteed to be loaded by
plugin class loader.
No association - service - no plugin, node was just skipped.
------------------------------------------------------------------------
* In Android test-related source sets, add an implementation dependency,
not an api one, because adding dependencies to the api configurations
leads to warnings from AGP
* Add the default stdlib dependency only to the Android main source set,
as duplicating it elsewhere leads to issue with publishing the project
with the `maven` plugin (duplicate conf2ScopeMappings)
* Add a DSL property `kotlin.coreLibrariesVersion` that is used as the
default version for all org.jetbrains.kotlin dependencies instead of
the plugin version used previously – the pluging version is the
default now.
* Support omitting the `kotlin-stdlib-*` dependencies in all kinds of
projects. For the JVM source sets, choose the stdlib module by
checking the jvmTarget in the compilations – if all compilations
target 8+ then use `kotlin-stdlib-jdk8`.
* Support adding a single dependency on the fake module
`kotlin-test-multiplatform` that is later expanded into the
appropriate dependencies on `kotlin-test-*` modules. For JVM source
sets, detect the test framework by inspecting the test tasks.
* (minor) Fix _executionSource not updated in KotlinJvmTestRun
* (minor) Lazily query `kotlinUsageContext`'s dependency-related
properties to avoid freezing the configurations
Issue #KT-38221 Fixed
Issue #KT-40225 Fixed
Lambda hints are placed at the end of a line in such a way that user
can't move the caret behind it. Unfortunately, hint provision
infrastructure doesn't take this detail into account.
As a workaround, KotlinLambdasHintsProvider now returns an empty result
(sink) to the outer infrastructure and accesses editor's inlay model
itself.
KotlinReferencesTypeHintsProvider which in now responsible for
type hints is not compatible with the existing
InlayTypeHintsTest. Because of that tests were migrated to the new
infrastructure.
KotlinSuspendingCallHintsProvider which in now responsible for
suspending call hints is not compatible with the existing
SuspendingCallHintsTest. Because of that tests were migrated to the new
infrastructure.
KotlinLambdasHintsProvider which in now responsible for lambda related
hints is not compatible with the existing LambdaReturnValueHintsTest.
Because of that tests were migrated to the new infrastructure.
Some time ago platform couldn't place hints at the end of a line.
This is how KotlinCodeHintsPass appeared. Class was responsible for
lambda related hints. Now that platform evolved functionality was moved
to KotlinLambdasHintsProvider.
Platform supports 2 interfaces for inlay hints providers:
- InlayParameterHintsProvider [1]
- InlayHintsProvider [2]
KotlinInlayParameterHintsProvider as an implementation of (1) and a
source of "Inlay Hints" menu has the following limitations:
- Platform treats component as a source of "Parameter hints" submenu
that cannot be split. Once can only add or remove its nested checkboxes.
- Only a single instance of (1) can be defined.
To have a separate menu items for "Inlay Hints" existing
KotlinInlayParameterHintsProvider was split. New providers
implementing (2) were extracted from it:
- KotlinReferencesTypeHintsProvider
- KotlinSuspendingCallHintsProvider
- KotlinLambdasHintsProvider
TODO: HintType move as a separate commit
In the original fix for KT-39809, the Kapt plugin was not given a proper
empty implementation stub: it was added to `Kapt3GradleSubplugin`, while
originally the Kapt subplugin's META-INF/services entry pointed to
`Kapt3KotlinGradleSubplugin`.
This commit makes the correct class implement the legacy interface.
Issue #KT-39809 Fixed
In the `KotlinPlatformType` disambiguation rule, don't prefer `common`
when there's a `jvm` or an `androidJvm` variant, as this would conflict
with disambiguation rules created by the other plugins, such as Gradle's
`java` which will choose `org.gradle.usage=java-api` and lead to
ambiguity.
Issue #KT-32239 Fixed
There's no known problems connected with this change, but wrong
comparison might cause tests flakiness.
`allowKotlinPackage` and `classpath` fields were not included.