Mark testFixtures dependencies as optional in published pom

Same as Gradle does by default.

^KT-53670 Fixed
This commit is contained in:
Yahor Berdnikau
2022-08-23 14:23:24 +02:00
parent 7f1ab29668
commit 55e1061862
@@ -45,13 +45,15 @@ publish(moduleMetadata = true) {
val kotlinLibraryComponent = components[ADHOC_COMPONENT_NAME] as AdhocComponentWithVariants
kotlinLibraryComponent.addVariantsFromConfiguration(configurations.testFixturesApiElements.get()) {
mapToMavenScope("compile")
skipUnpublishable()
mapToMavenScope("compile")
mapToOptional()
}
kotlinLibraryComponent.addVariantsFromConfiguration(configurations.testFixturesRuntimeElements.get()) {
mapToMavenScope("runtime")
skipUnpublishable()
mapToMavenScope("runtime")
mapToOptional()
}
}