* Add configurations for consuming source sets metadata (extending the
source set's dependency configurations). These configurations will be
used by the IDE to pick up the dependencies metadata.
* Remove the universal preset from the default presets, create a
metadata target by default for compiling and publishing the metadata
of `commonMain` (in the future, we will publish and consume the
metadata of the other source sets as well).
* Make the classpath configurations of common modules consume the
metadata and thus ensure compatibility of 1.2.x MPP with the new MPP
model.
Before the last change in this logic, the resources filtering used
the original Kotlin source directories, not those with Java filtered
out.
Make sure that the Java source directories that are added to the Kotlin
source set are excluded from the resources, and all the related
configuration works lazily, i.e. supports source sets modification
after configuration took place.
* Add a platform type androidJvm that is one-way compatible (can
consume but cannot be consumed) with jvm, register the matching
strategy
* Write our attributes to Android's output configurations (this uses
a naming convention that Android inherits from Java, but there's no
public API at the moment for that)
Introduce Gradle models for plugins 'kotlin-allopen', 'kotlin-noarg' and
'kotlin-sam-with-receiver'. Corresponding model builders are registered
in each one of those plugin main classes.
A Kapt model for Gradle projects including 'kotlin-kapt'plugin is
introduced. Its model builder KaptModelBuilder produces an
implementation of these models and can be queried through the Gradle
Tooling API when needed. Model builder is registered in
Kapt3GradleSubplugin.
A KotlinProject model for Gradle projects including Kotlin (JVM, JS or
common) plugins is introduced. Its model builder KotlinModelBuilder
produces an implementation of these models and can be queried through
the Gradle Tooling API when needed. Model builder is registered in the
corresponding Kotlin Gradle plugins.
Model definition should be published as a separate artifact in public
repositories so it can be consumed when needed.
1) Exclude the providers arguments from the kapt inputs, as the values
may contain absolute paths, may be output properties etc. The providers
should correctly annotate their inputs.
2) Fix the options passed to kapt as 'value=option' (leading to all the
options collapse into one with the null key), use 'key=option' instead
to make Kapt pass them as '-Aoption'.
Issue #KT-23866 Fixed
Issue #KT-25027 Fixed
Currently the test makes more harm than use:
* It is too slow: two executions (with different Gradle versions)
take 5 minute on CI.
* It is unreliable: the test fails on CI for months
with insignificant violation of the memory growth limit.
After this change:
* the memory growth limit is increased;
* the test run count is decreased;
* changes the test to use separate project with minimal amount of classes
(we're not interested in compiler's memory leaks; only Gradle plugin specific ones);
We run all tests with multiple Gradle versions now,
so parametrized test is not needed anymore.
Test cases are moved to relevant test classes.
testKaptProcessorPath is removed because kapt1 is not supported anymore.
Encapsulate daemon run count within DaemonRegistry to simplify reasoning
about the state.
Never count test process Gradle version as active Gradle process.
Fix the bug when daemon version hit max run count threshold
would be restarted every time after that.
Otherwise the test `KotlinAndroid32GradleIT.testIncrementalCompile`
failed with Android resource linking failed error:
"attribute 'package' in <manifest> tag is not a valid Android package name: 'foo'."