As the `*Default` configurations are gone, each K/N target now has two
consumable configuration, the `*ApiElements` and the
`*CInteropApiElements`. They have diverging sets of attributes (both
more concrete than `*Default` had).
To make their attribute sets non-diverging, we set the
local-to-project=public on the `*CInteropApiElements` in order to match
the same attribute on the `*ApiElements` configuration
Related to the original fix of KT-47506
This is done to prevent unwanted files from also being located
in the output directory. If the task is executed it is expected
that the output directory only contains this one file.
This is necessary, since *everything* located in the output directory
will potentially be bundled into release apks.
^KT-48019
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
desugar it with source/target versions set to 1.8, otherwise it
reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
with assertions enabled if AGP < 4.0.0 is used because of
https://issuetracker.google.com/issues/148661132. The tests which use
old AGP versions are probably not relevant anymore anyway.
Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.
(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
* Set the local-to-project attribute on the compatibility metadata
variant's "elements" configuration; not setting this attribute could
lead to ambiguity because of diverging sets of non-matched attributes
* Don't create the `runtimeOnly` configuration for the Kotlin/Native
targets (or potentially other targets with no runtime dependencies),
as the K/N target configurator is not aware of the configuration and
would not set the configuration up properly
* Don't create the legacy `*Default` configurations, as they basically
duplicate the `*ApiElements` / `*RuntimeElements` configurations but
don't have all the right attributes, so they are reckoned compatible
with some consumers unnecessarily and pollute the dependency
resolution error reports.
Issue #KT-47506
There are several changes here but they all required for at least one test to pass.
- Implemented String class and several utility functions using built-in CharArray
- Added new constant memory segment to hold string literals and required funcs to work with them
- Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
Implemented `test multiple cinterops with test source sets and compilations`
This test will assert source set dependencies
and shared native compilations.
^KT-47775
^KT-47053
^KT-47775 Verification Pending
This implementation will be lenient toward the common
*Test.dependsOn(*Main) mistake.
^KT-47053 Verification Pending
Support source sets that do not have a dedicated
shared native compilation. Also support additional visible source sets
coming from associate compilations.
Adapted existing `test KT-47641 commonizing c-interops does not depend on any source compilation`
to add a project dependency from a project with c-interops (p2)
to a project without any c-interops (p0)
This leads to compilation of project p0, since the
cinteropApiElements configuration was not created on p0
- KotlinNativeCompilation
Change how associate compilations are connected.
Instead of using the implementation configuration, it now uses
the `compileDependencyFiles` directly. This will keep the
implementation configuration from containing any main compilation's
output. Therefore this configuration can still be forwarded to the
cinterop tool.
- KotlinNativeTargetConfigurator.kt CInteropConfigurations.kt
Create special configurations for cinteropApiElements and
cinterop dependencies. This configuration is tries to resolve
only cinterop dependencies when such variants are offered by a project.
^KT-47641 Verification Pending
Ensure that the serialization plugin's artifact (and, possibly, some
other prioritized plugin artifacts) are put first to the -Xplugin=...
classpath passed to the compiler.
This fixes the conflict of the serialization plugin with some other
plugins altering the IR in unexpected ways.
Issue #KT-47921
This may happen when build itself is running on JDK9+ and toolchain
is set to <=JDK1.8. CompilerEnvironment gets 'tools.jar' from the
current Gradle Daemon JDK, but there was a check if exception should be
thrown that uses 'javaVersion' from toolchain provided JDK.
Additionally also fixed 'tools.jar' was not provided for
'KotlinCompileWithWorkers' task.
^KT-47940 Fixed