This function used to only calculate the mapping once and store it for
the project, so it was unsafe to use early. Fix that by evaluating the
value each time and then freezing it at the point of either task graph
being ready, or any task being executed.
Also, store the map in the project's `ext` rather than in a static weak
hash map, which is safer wrt memory leaks.
* KotlinExecution
* KotlinExecutionSource
* KotlinTestRun
* Aggregating executions and execution sources
* KotlinTargetWithTests
* Add a `testableTargets` extension
* Make some Kotlin/Native targets testable (this requires
having a separate preset type for them)
* Implement test runs encapsulating the tests for all
existing testable targets by refactoring their
TargetConfigurator classes
Issue #KT-32679 Fixed
Add test for aggregating incremental annotation processors and JDK9.
This makes sure the implementation is not using any types that have
been removed in JDK 9.
Fix test failure on Windows, where backslash was not escaped
in a build file. Also, remove obsolete test for Gradle 4.2,
because 4.3 is the minimum supported version.
Earlier, K/N 1.1 was used when testing the kotlin.native.version
property. But this version doesn't support the -no-endorsed-libs
flag add recently. This patch updates K/N version in tests.
- To set custom adapter for kotlin-test, it is necessary to inject adapting
code to webpack's input, so then it is executed inside browser and set
custom adapter
This code will be injected to webpack's input
Switch to Java reflection when getting the ASM version used
to analyze classes. Using Kotlin reflection resulted in the constant
being inlined.
Fixes KT-31291
Fixes KT-33493
When analyzing incremental changes in the KAPT task, incremental compilation
can handle directory changes, Java source file changes, jar/.class file changes,
and changes to the ABI structure of the classpath. Anything else should cause
a full recompilation.
Test: KaptIncrementalWithIsolatingApt.testNonIncrementalWithUnrecognizedInputs
The free args DSL may be changed in 1.3.70 for all platforms. So it
was decided to preserve the old behaviour here to avoid making
similar changes in two releases in a row.
We leave an ability to build final native binaries directly from
sources instead of building them from a klib. Thus we allow
a user to workaround possible bugs related to building a final
binary from a klib (-Xinclude compiler flag).
Earlier we propagated all free args specified for a compilation into
a link task. It was required because the link task actually compiled
the same source as the compile task but with another output kind.
But currently a link task produces a final binary from a klib instead
of sources. It means that such a propagation becomes incorrect. Now
options related to the compiler frontend like -Xexperimental must
be specified per compilation while options related to the compiler
backend (e.g. -opt, -g, -Xstatic-framework etc) - per binary.
This path shows a special warning if some of "binary-specific"
arguments are passed to a compilation.