When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
* add the way to specify another compatible target for target backend.
It's used to generate a test for X_IR backend even when in a test data
is explicitly written a target: "// TARGET_BACKEND: X".
* Add the ability to run tests "ignored" with the "IGNORE_BACKEND" directive
as regular tests, i.e. w/o catching exceptions.
* Print stack trace of caught exception inside tests "ignored"
with the "IGNORE_BACKEND" directive.
In Gradle testCompileOnly configuration does not extend compileOnly.
Since :generators project does not have main source set,
compileOnly dependencies have never worked.
Instead "kotlin-reflect" was resolved transitevely trough
:compiler:frontend.script module (a runtime dependency becomes
a compile transitive dependency).
In ccd6263787 I replaced `runtime` dependency
on "kotlin-reflect" with `runtimeOnly` breaking `:generators:compileTestKotlin`.
Previously, the classpath of this module was used to run all tests in
the project. This is why it depended on almost all modules in the
project. Now, in the Gradle build, these dependencies are no longer
needed
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.
Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
This is needed only for faster compilation of the Kotlin project itself
and has no effect on the public artifact
org.jetbrains.kotlin:kotlin-reflect.
The problem this is solving is the rebuild of the project once anything
has been changed in modules in 'core' (even inside function bodies, i.e.
a non-API change). Previously, changes in 'core' led to the compilation
of kotlin-reflect, which led to the rebuild of all modules depending on
kotlin-reflect directly or indirectly (which is almost all modules in
the project) because kotlin-reflect's artifacts are custom-built and the
changes can not be picked up incrementally. But 99.9% of the time the
initial changes in 'core' could not have any effect on the usages of
kotlin-reflect, because classes from those modules are moved to an
internal package in kotlin-reflect and thus are an internal
implementation detail.
Now, changes in 'core' still lead to the compilation of kotlin-reflect
and to the process of building the custom jar. But if a module depends
on kotlin-reflect-api, not kotlin-reflect, then the incremental
difference checker will detect that the module does not have to be
recompiled if there hasn't been any changes to the API of
kotlin-reflect-api. Which means that the module will not be rebuilt on
every change in 'core'.
This commit only introduces the new module. The dependencies
(kotlin-reflect -> kotlin-reflect-api) are replaced in the next commit.
... and invoke it directly in kotlin-reflect's build file, instead of
running another instance of compiler to evaluate a script. Also only
strip kotlin.Metadata, since it's the only annotation with heavy
metadata on Kotlin-generated class files