Before this commit, we just recreated class header
for external IR class found by signature. However, it's not required,
because super-types, type parameters, etc. are already initialized.
So now we just read type parameters and build cache for them.
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.