Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Technically, versions.kotlin-reflect should be the same as in minimal
supported IDEA (which is 213 IDEA and 1.5.10 version of reflect) but,
unfortunatelly, 1.5.10 is too old for the Kotlin repo.
ScriptCompilerTest.testTypeAliases fails if you try to use such an old
version:
java.lang.ClassCastException: kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedTypeAliasDescriptor cannot be cast to kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
at kotlin.reflect.jvm.internal.KClassImpl$Data$nestedClasses$2.invoke(KClassImpl.kt:102)
at kotlin.reflect.jvm.internal.KClassImpl$Data$nestedClasses$2.invoke(KClassImpl.kt:47)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:92)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:31)
at kotlin.reflect.jvm.internal.KClassImpl$Data.getNestedClasses(KClassImpl.kt)
at kotlin.reflect.jvm.internal.KClassImpl.getNestedClasses(KClassImpl.kt:240)
at org.jetbrains.kotlin.scripting.compiler.test.ScriptCompilerTest.testTypeAliases(ScriptCompilerTest.kt:46)
Well, let's use 1.6.10 which is kotlin-reflect bundled into 221.
We already have stepping tests for Kotlin/JVM.
They are helpful for testing the correctness of the generated
debugging information.
They are better than line number tests in that they allow to test the
_behavior_, not the generated data. The structure of the data may change
even if the behavior stays the same. For that reason, stepping tests
are more stable.
Version 7.1.1 is absent in jcenter, so additional repository was added
in some modules.
Leave old version in NewMultiplatformIT.kt because of
`This version of Shadow supports Gradle 7.0+ only. Please upgrade.` error.
^KTI-733 Fixed
PsiSubstitutor instantiation doesn't need EmptySubstitutor service anymore.
Remove hack with interface field reassign that doesn't work with JDK >= 12.
Leave hack for PsiSubstitutor in AS40 as KotlinCoreApplicationEnvironment
is not expected to be triggered from the plugin.
#KT-36039 Fixed