This should protect from cases when CompositeMetadataArtifact got
polluted due to some bugs or user misconfiguration.
One of the cases is when resource file is added to common source set.
In this case due to KT-66563 bug, resources will be mixed in to the
KLIB content. But if for some source set there is no sources.
Then in composite metadata artifact will be only the resources.
And previous implementation of CompositeMetadataArtifactImpl treated
that content as Metadata KLIB, however the metadata compiler didn't.
And thus it was failing with. This change makes it stricter.
Now it checks for `default/manifest` entry. This entry is considered
a sane check for KLIB content.
^KT-65315 Verification Pending
Because `public JvmTypeExtensionVisitor` was removed, a new place for `const val PLATFORM_TYPE_ID`
is required. It is logical to place it as a some kind of constant for Km node;
however, because it is platform-specific, there is a need for an empty
`KmFlexibleTypeUpperBound.Companion` in metadata common sources
and `public val KmFlexibleTypeUpperBound.Companion.PLATFORM_TYPE_ID`
extension in kotlin-metadata-jvm sources.
See also: KT-63156
This includes APIs such as:
- Visitors API
- Obsolete KotlinClassMetadata reading and writing API
- Extension and extension visitors API
- Flags and `class Flag` (a reduced version of it was moved to test sources)
- Various utility methods
Extensions mechanism got reworked with the removal of public visitors; it is
completely internal now with special accessors in kotlinx.metadata.internal
package.
Since `var KmClass.flags` is internal now (instead of being deprecated), special
utility functions with the name `_flagAccess` were added to internal package
for testing purposes.
^KT-63156 Fixed
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped
^KT-64517
Tests were using deprecated targets to produce ERROR-diagnostics.
Replace it with a different diagnostic
(CommonMainOrTestWithDependsOnEdges)
^KT-64517
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries
^KT-64517
* Generate dependencies in a less copypasty way
* Test a slightly more intricate graph of dependencies without resources
in parts of the graph
^KT-65540
Creating `tar` process is not supported by configuration cache.
Inner Gradle copy and archive operations don't work well with symlinks.
That is why we are using utils from org.apache.commons:commons-compress.
^KT-66422 Fixed
This checker was added to check that k/n home was correctly overridden.
With k/n toolchain we always download k/n distribution.
That is why when k/n toolchain is enabled we don't need this check.
^KT-65624 Fixed
Resolving such dependencies was lenient, however it produced
a lot of annoying error messages in the IDE. Because "file not found".
KGP already warns user if they are declared Apple-specific targets
on non-macos machine.
^KT-66514 Verification Pending
It was failing with ClassCastException in an attempt of using it.
Also added a test case to cover the logic with friendArtifactResolver
^KT-66431 Verification Pending
Instead of using raw List types in the Gradle extension, ListProperty
should be used instead to make it more Gradle idiomatic. Also marking
the extension and all properties as experimental to allow easier
changing in the future.
^KT-65952 Fixed