diff --git a/prepare/compiler/build.gradle.kts b/prepare/compiler/build.gradle.kts index 00c2ede15f0..eddfe2ca9bc 100644 --- a/prepare/compiler/build.gradle.kts +++ b/prepare/compiler/build.gradle.kts @@ -203,6 +203,8 @@ dependencies { if (kotlinBuildProperties.isInJpsBuildIdeaSync) { sources(kotlinStdlib(classifier = "sources")) sources("org.jetbrains.kotlin:kotlin-reflect:$bootstrapKotlinVersion:sources") + distCommonContents(kotlinStdlib(classifier = "common")) + distCommonContents(kotlinStdlib(classifier = "common-sources")) } else { sources(project(":kotlin-stdlib", configuration = "distSources")) sources(project(":kotlin-stdlib", configuration = "distJsSourcesJar")) @@ -213,10 +215,10 @@ dependencies { distJSContents(project(":kotlin-stdlib", configuration = "distJsContent")) distJSContents(project(":kotlin-test:kotlin-test-js", configuration = "distJs")) - } - distCommonContents(kotlinStdlib(suffix = "common")) - distCommonContents(kotlinStdlib(suffix = "common", classifier = "sources")) + distCommonContents(project(":kotlin-stdlib", configuration = "commonMainMetadataElements")) + distCommonContents(project(":kotlin-stdlib", configuration = "metadataSourcesElements")) + } distMavenContents(kotlinStdlib(classifier = "sources")) @@ -425,7 +427,13 @@ val distKotlinc = distTask("distKotlinc") { val distCommon = distTask("distCommon") { destinationDir = File("$distDir/common") - from(distCommonContents) + from(distCommonContents) { + rename { name -> + name + .replace("-metadata.jar", "-common.jar") + .replace("-metadata-sources.jar", "-common-sources.jar") + } + } } val distMaven = distTask("distMaven") {