KPM: add module name to directory names in the sources JAR

For example, it will now be `common` -> `commonMain`, so that the
behavior emulates the sources JARs built by the stable MPP plugin
This commit is contained in:
Sergey Igushkin
2022-02-01 00:47:36 +04:00
committed by Space
parent 6546ebd248
commit a58f04e30b
@@ -6,6 +6,7 @@
package org.jetbrains.kotlin.gradle.plugin.mpp.pm20
import org.gradle.api.tasks.TaskProvider
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.unambiguousNameInProject
import org.jetbrains.kotlin.gradle.plugin.mpp.sourcesJarTaskNamed
interface KotlinSourceArchiveTaskConfigurator<in T : KotlinGradleVariant> {
@@ -19,7 +20,7 @@ object DefaultKotlinSourceArchiveTaskConfigurator : KotlinSourceArchiveTaskConfi
project = variant.project,
sourceSets = lazy {
FragmentSourcesProvider().getSourcesFromRefinesClosureAsMap(variant)
.entries.associate { it.key.fragmentName to it.value.get() }
.entries.associate { it.key.unambiguousNameInProject to it.value.get() }
},
artifactNameAppendix = variant.name
)