[Gradle] Always add kotlin-stdlib-wasm
Published kotlin-stdlib with Gradle metadata does not yet include kotlin-stdlib-wasm variant, so KGP should always add it separately even if kotlin-stdlib was added into a common source set. ^KT-59000
This commit is contained in:
committed by
Space Team
parent
94013b1ff2
commit
73e8fc6183
+13
@@ -280,6 +280,19 @@ class KotlinSpecificDependenciesIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@JsGradlePluginTests
|
||||
@DisplayName("Stdlib should be added into wasm compilations")
|
||||
@GradleTest
|
||||
fun testStdlibAddedIntoWasmCompilationDependencies(gradleVersion: GradleVersion) {
|
||||
project("wasm-d8-simple-project", gradleVersion) {
|
||||
checkTaskCompileClasspath(
|
||||
"compileKotlinWasmJs",
|
||||
listOf("kotlin-stdlib-wasm"),
|
||||
isBuildGradleKts = true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmGradlePluginTests
|
||||
@DisplayName("KT-41642: adding stdlib should not resolve dependencies eagerly")
|
||||
@GradleTest
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ private fun KotlinTarget.addStdlibDependency(
|
||||
// except standalone compilations which as not using 'common'
|
||||
if (isMppProject &&
|
||||
stdlibVersion >= kotlin1920Version &&
|
||||
compilation.platformType != KotlinPlatformType.common &&
|
||||
(compilation.platformType != KotlinPlatformType.common && compilation.platformType != KotlinPlatformType.wasm) &&
|
||||
kotlinSourceSet.hasDependencyOnCommon()
|
||||
) return@withDependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user