It's refactoring-preparation commit. In later commits I will add possibility
to disable IDE modules with flags in gradle build (first step towards
removing IDE modules from kotlin repo). Thus, we need to extract IDE tests
generator in separate module for being possible to disable it with flags
This task is used for cooperative compilation with intellij.
See 'Install compiler-for-ide jars' run configuration in
intellij/kotlin-ide/intellij-kotlin repo
This commit fixes:
```
* What went wrong:
Execution failed for task ':kotlin-ide.intellij.platform.testExtensions:compileKotlin'.
> Could not resolve all files for configuration ':kotlin-ide.intellij.platform.testExtensions:compileClasspath'.
> Could not find intellij-core-analysis-deprecated-202.7660.26.jar (kotlin.build:ideaIC:202.7660.26).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/lib/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/plugins/ideaIC/lib/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/intellij-core-analysis-deprecated-202.7660.26.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/intellij-core-analysis-deprecated.jar
```
Prefer to have all module dependencies, including dependencies on
stdlib/reflect, declared explicitly. This allows to have tests on
situations like the one in KT-45308: three modules A<-B<-C, where C
doesn't depend on A, which was compiling correctly with the old JVM
backend before 1.5, but started to fail with JVM IR in 1.5.
Also simplify the code a bit, remove duplicated logic.
This is only usedful for code splitting. The output .js file name
is provided by the build system during the module compilation.
It is desirable to keep the .js output file names same as in old BE,
but calculating those name during the klib -> js phase is tricky.
Thus the desired names are saved in the klib, and used later on.
If an accessor is not available at runtime we fall back
to the property access.
This is useful in cases when JS objects are casted to Kotlin
classes implicitly. This pattern did work in the old BE, which
lead to a significant amount of code which doesn't work anymore.
Refactor common code into new abstract class
IncrementalCompilationBaseIT to make the code cleaner and easier to
evolve.
Also add a few missing key scenarios for ABI and non-ABI changes in
Kotlin files, and make it consistent with the test for changes in Java
files.
Bug: KT-45777
Test: Updating them