Skip to content

Commit

Permalink
Add wasmJs to easy-to-add modules
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvanyo committed Dec 19, 2024
1 parent db8be0f commit b8cc425
Show file tree
Hide file tree
Showing 10 changed files with 2,017 additions and 7 deletions.
6 changes: 1 addition & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ buildscript {
}
}

task<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

tasks.register("check") {
tasks.named { it == "check" }.configureEach {
dependsOn(
gradle.includedBuilds.map {
it.task(":check")
Expand Down
6 changes: 6 additions & 0 deletions clock/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
Expand All @@ -32,6 +34,10 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
val commonMain by getting {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ kotlinInject-runtime = { group = "me.tatarka.inject", name = "kotlin-inject-runt
kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "kotlinxCollectionsImmutable" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-core-wasmJs = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core-wasm-js", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerialization" }
Expand Down
6 changes: 6 additions & 0 deletions inject-scopes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
Expand All @@ -31,6 +33,10 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
val commonMain by getting {
Expand Down
10 changes: 9 additions & 1 deletion kmp-state-restoration-tester/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
alias(libs.plugins.convention.androidLibraryTesting)
alias(libs.plugins.convention.detekt)
alias(libs.plugins.convention.kotlinMultiplatformCompose)
alias(libs.plugins.gradleDependenciesSorter)
Expand All @@ -33,6 +34,10 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
val commonMain by getting {
Expand All @@ -53,5 +58,8 @@ kotlin {
val androidMain by getting {
dependsOn(jbMain)
}
val wasmJsMain by getting {
dependsOn(jbMain)
}
}
}
1,976 changes: 1,976 additions & 0 deletions kotlin-js-store/yarn.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions random/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
Expand All @@ -32,6 +34,10 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
val commonMain by getting {
Expand Down
6 changes: 6 additions & 0 deletions resources-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
Expand All @@ -31,6 +33,10 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
val commonMain by getting {
Expand Down
6 changes: 6 additions & 0 deletions resources-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.convention.kotlinMultiplatform)
alias(libs.plugins.convention.androidLibrary)
Expand All @@ -31,4 +33,8 @@ android {
kotlin {
androidTarget()
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}
}
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pluginManagement {
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven(url = "https://storage.googleapis.com/r8-releases/raw") {
content {
Expand Down

0 comments on commit b8cc425

Please sign in to comment.