099ad8de1e
Also, fix empty configurations created for targets that have no runtime
outputs (metadata ones, especially), which could get chosen by Gradle
during dependency variant-aware resolution of a `project(...)`
dependency.
See also: d13ca38
With the attribute set, an input configuration that does not require the
Gradle's USAGE attribute but requires Kotlin platform metadata, will
fail to resolve because the attributes set on the consumable
output configurations are not subsets of each other, as follows:
> Cannot choose between the following variants of project :lib:
- metadataApiElements
- metadataDefault
- metadataRuntimeElements
All of them match the consumer attributes:
- Variant 'metadataApiElements':
- Found org.gradle.usage 'java-api' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'common' and found
compatible value 'common'.
- Variant 'metadataDefault':
- Required org.jetbrains.kotlin.platform.type 'common' and found
compatible value 'common'.
- Variant 'metadataRuntimeElements':
- Found org.gradle.usage 'java-runtime-jars' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'common' and found
compatible value 'common'.
Issue #KT-26383 Fixed
Gradle Plugin
The Gradle plugin sources can be found in this (kotlin-gradle-plugin) module.
To install the Gradle plugin into the local Maven repository, run this command from the root of Kotlin project:
./gradlew :kotlin-gradle-plugin:install
The subplugin modules are :kotlin-allopen, :kotlin-noarg, :kotlin-sam-with-receiver. To install them, run:
./gradlew :kotlin-allopen:install :kotlin-noarg:install :kotlin-sam-with-receiver:install
To find more details about the plugins provided by this artifact and their tasks refer to Module.md.
Gradle Plugin Integration Tests
See the module libraries/tools/kotlin-gradle-plugin-integration-tests