This is because AGP 3.4 and 3.6 have version of R8 that is unable
to handle kotlin-stdlib 1.6+. Issue https://issuetracker.google.com/148661132
has more details on this.
Instead of adding logic to remove assertions based on the AGP version,
this change fully removes them to keep things simple. Also, running with
assertions enabled may be too much for the integration tests.
Android Gradle plugin resolves the *Classpath configurations in an
artifact view with an artifactType attribute set, which should
give a resolved variant with a different `org.gradle.category`
attribute. With `org.gradle.category=library` set by the Kotlin
Gradle plugin, that couldn't work.
To fix this, don't set the `org.gradle.category` attribute on the
Android resolvable configurations.
TODO: Add integration tests!
Adding this annotation to the test will provide requested JDKs + Gradle
versions matrix as test parameter.
It is also possible to filter out supported by Gradle version JDKs.
^KT-45745 In Progress
When HMPP is enabled by default it is still printing warnings about
enableDependencyPropagation and enableGranularSourceSetsMetadata flags
#KT-48818 Fixed
We will split our tests into supported platforms, like JVM, Js, etc...
Tests for supported Gradle features should be added per platform.
To run any test (except daemons) also "all" task was added.
^KT-45745 In Progress
* Introduce a new org.gradle.usage value: kotlin-cinterop
* Add compatibility+disambiguation rules to ensure that kotlin-cinterop
consumers can also fall back to ordinary (kotlin-api) published
variants, but not vice versa
* This ensures that ordinary kotlin-api consumers don't encounter
equally-compatible candidates where one is the normal API elements
and the other is C interop API elements
* Set org.gradle.usage = kotlin-cinterop in the C interop API elements
configurations and dependency-consuming configurations
Issue #KT-48709
* Don't set the localToProject attribute anymore, as it prevents proper
disambiguation if not set properly on all configurations, while all
the intentionally-public configurations
should already have the same value.
* Disambiguate o.j.k.platform.type Android vs JVM preferring JVM, as
Android should have other attributes which make pure-Android consumers
match the Android MPP variants.
* With Gradle 7.0+, set the attribute
`org.gradle.api.attributes.java.TargetJvmEnvironment` on the JVM &
Android elements configurations, which helps pure-Android consumers
to match the Android, not JVM variants. This fixes KT-30961 for
Gradle 7.0+ and AGP 7.0+
Issues: KT-49189, KT-30961
Calculations of compilation outputs implicitly requires compile task configuration to execute `clean` task. This implicit configuration works unstable in parallel builds. We probably fine with the fact that outputs that are configured to be outside of build directory will not be cleaned by `clean` task
#KT-48046 Fixed
This allows to split concepts of TestProject(whole build and options)
and actual Gradle project, which could be one of the main project
subprojects.
^KT-45745 In Progress