[stdlib-mpp] Switch kotlin-stdlib project to multiplatform

#KT-56106
This commit is contained in:
Ilya Gorbunov
2023-03-24 09:51:12 +01:00
committed by Space Team
parent fac620df0b
commit 34720f27d4
9 changed files with 63 additions and 10 deletions
+10 -1
View File
@@ -980,4 +980,13 @@ private class ComponentWithExternalVariants(
override fun getVariants(): Set<SoftwareComponent> = externalComponents
}
// endregion
// endregion
// for legacy intra-project dependencies
for (name in listOf("sources", "distSources")) {
val sourcesConfiguration = configurations.getOrCreate(name).apply {
isCanBeResolved = false
isCanBeConsumed = true
}
artifacts.add(sourcesConfiguration.name, tasks["jvmSourcesJar"])
}
+8
View File
@@ -376,3 +376,11 @@ tasks.register("runMocha", NodeTask) {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile) {
kotlinOptions.freeCompilerArgs += "-Xforce-deprecated-legacy-compiler-usage"
}
if (BuildPropertiesExtKt.getKotlinStdlibMpp(project.kotlinBuildProperties)) {
afterEvaluate {
tasks.withType(AbstractPublishToMaven).configureEach {
enabled = false
}
}
}
@@ -32,7 +32,7 @@ sourceSets {
}
val copySources by task<Sync> {
val stdlibProjectDir = project(":kotlin-stdlib").projectDir
val stdlibProjectDir = file("$rootDir/libraries/stdlib/jvm")
from(stdlibProjectDir.resolve("runtime"))
.include("kotlin/TypeAliases.kt",