diff --git a/README.md b/README.md index e5cf8ac..d888ada 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![badge-platform-jvm] ![badge-platform-js] ![badge-platform-js-node] +![badge-platform-wasm] ![badge-platform-linux] ![badge-platform-macos] ![badge-platform-ios] diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index bf78777..a8f3587 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -18,6 +18,7 @@ import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl import org.gradle.api.Action import org.gradle.api.JavaVersion +import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl fun KmpConfigurationExtension.configureShared( java9ModuleName: String? = null, @@ -36,8 +37,18 @@ fun KmpConfigurationExtension.configureShared( } js() - // wasmJs {} - // wasmWasi {} + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + target { + nodejs() + } + } + @OptIn(ExperimentalWasmDsl::class) + wasmWasi { + target { + nodejs() + } + } androidNativeAll() diff --git a/build.gradle.kts b/build.gradle.kts index cbcfafe..7a7d580 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin +import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension @@ -37,6 +40,17 @@ plugins.withType { the().lockFileDirectory = rootDir.resolve(".kotlin-js-store") } +plugins.withType { + the().apply { + nodeVersion = "21.0.0-v8-canary202309167e82ab1fa2" + nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary" + } + + tasks.withType().configureEach { + args.add("--ignore-engines") + } +} + apiValidation { @Suppress("LocalVariableName") val CHECK_PUBLICATION = findProperty("CHECK_PUBLICATION") as? String