[Gradle, Wasm] Compatible wasm distribution task with configuration cache

^KT-64851 fixed
This commit is contained in:
Ilya Goncharov
2024-01-24 11:55:33 +00:00
committed by Space Team
parent f502edd1de
commit 9a74a5fcdd
4 changed files with 42 additions and 9 deletions
@@ -51,4 +51,17 @@ class WasmConfigurationCacheIT : KGPBaseTest() {
}
}
}
@DisplayName("Browser case works correctly with configuration cache")
@GradleTest
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_6)
fun testBrowser(gradleVersion: GradleVersion) {
project("wasm-browser-simple-project", gradleVersion) {
assertSimpleConfigurationCacheScenarioWorks(
"assemble",
buildOptions = defaultBuildOptions,
executedTaskNames = listOf(":compileKotlinWasmJs", ":wasmJsBrowserDistribution")
)
}
}
}
@@ -0,0 +1,16 @@
plugins {
id("org.jetbrains.kotlin.multiplatform")
}
repositories {
mavenLocal()
mavenCentral()
}
kotlin {
wasmJs {
binaries.executable()
browser {
}
}
}
@@ -0,0 +1,8 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
fun main() {
println("Hello, world")
}