Currently JS/IR and WASM targets share this attribute.
This causes issues for HMPP projects on
Variant-resolution stage when both JS/IR and WAS published.
Given the fact that WASM compilation uses IR only it is logical
to exclude such attribute which should fix variant resolution in HMPP
Kotlin's compilation task outputs usually contains a lot of small files,
which is not so performant to copy as-is into new location. In this
change coping was replaced by using zip archive with no compression.
From my test I see around 2x performance improvement on doing task
outputs snapshot.
Further optimizations will be done via separate issue as they are
non-trivial and requires some changes on the compiler side.
^KT-49782 Fixed
Avoid adding ConfigurableFileTrees to sources as that causes
individual *.java files to be evaluated as sources roots. To
pass the dependency info, manual dependsOn is used, but in the
future SourceRoots should be fixed to carry the dependency info.
Not publishing this attribute fixes the consumers that don't set it.
Those may encounter either a conflict of Kotlin <= 1.5.31 rule on
{JVM, Android} -> Android vs Gradle rule
{standard-jvm, android} -> standard-jvm (causing disambiguation
failures). Or they may run Gradle < 7.0 which doesn't have
disambiguation rules for `org.gradle.jvm.environment` and therefore
treats it as an ordinary extra attribute, thus eventually preferring
variants which don't have it if no other disambiguation rule worked
(again causing disambiguation failures since some rules may prefer the
variants where this attribute *is* set).
Also set a "non-jvm" value of this attribute for non-JVM variants for
project-to-project dependencies in order to "align" them so that Gradle
doesn't prefer variants not marked with this attribute.
Extend the set of dependency resolution tests which check
compatibility of different kinds of Android & JVM consumers against
project and published library: add Kotlin 1.5.31 consumers, also check
consumption with different Gradle version than the one which did the
publication.
Issue #KT-49835
It's already was not causing the build failure because of changes related to persisted yarn.lock but this fix is more reliable.
Also hidden `kotlinNpmCachesSetup` task by unsetting task group as it's not supposed to be executed directly and moreover direct execution makes no sense.
#KT-47215 Fixed
Such type cannot be cast to a base type, if the former is loaded from
a different, parent classloader.
#KT-47857 Fixed
Co-authored-by: Aleksei.Cherepanov <aleksei.cherepanov@jetbrains.com>
Ensure that the attribute com.android.build.api.attributes.AgpVersionAttr
is not published when creating the android usage contexts.
^KT-49798 Verification Pending
This test publishes a Multiplatform/Android library locally with
a given AGP version (7.1-*+) and tests the compatibility with older
AGP consumer versions.
Two projects will be tested:
multiplatformAndroidConsumer:
kotlin("multiplatform") + android target depending on
the previous publication as 'commonMainImplementation' dependency
plainAndroidConsumer:
kotlin("android") depending on the previous publication
as 'implementation' dependency.
Both projects will test the 'assemble' umbrella task to ensure,
compatibility with the given publication.
^KT-49798 implicitly covered as well
This test covers ^KT-49798 by publishing an Android library and
checking that 'AgpVersionAttr' is not mentioned in any .module files
of those publications.