Skip to content

Commit 34352fa

Browse files
Merge pull request #101 from ahna92/support-wasm
Support wasmJs
2 parents 3c78480 + 41a293a commit 34352fa

File tree

13 files changed

+3091
-23
lines changed

13 files changed

+3091
-23
lines changed

.idea/runConfigurations/desktopApp.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/wasmJsApp.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ plugins {
1515
alias(libs.plugins.kotlinMultiplatform).apply(false)
1616
alias(libs.plugins.compose).apply(false)
1717
alias(libs.plugins.compose.compiler).apply(false)
18+
alias(libs.plugins.kotlinx.atomicfu).apply(false)
1819
alias(libs.plugins.publish).apply(false)
1920
alias(libs.plugins.api.validator)
2021
alias(libs.plugins.detekt)
@@ -70,6 +71,4 @@ tasks.withType<Detekt>().configureEach {
7071

7172
dependencies {
7273
detektPlugins(libs.detekt.formatting)
73-
}
74-
75-
apply(plugin = "kotlinx-atomicfu")
74+
}

gradle.properties

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13-
# org.gradle.parallel=true
13+
org.gradle.parallel=true
14+
org.gradle.configuration-cache=true
15+
org.gradle.caching=true
1416
# AndroidX package structure to make it clearer which packages are bundled with the
1517
# Android operating system, and which are packaged with your app"s APK
1618
# https://developer.android.com/topic/libraries/support-library/androidx-rn
@@ -22,6 +24,8 @@ kotlin.code.style=official
2224
# thereby reducing the size of the R class for that library
2325
android.nonTransitiveRClass=true
2426

27+
28+
2529
# Check submodules for module specific values
2630
SONATYPE_HOST=S01
2731
RELEASE_SIGNING_ENABLED=true
@@ -42,4 +46,8 @@ POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/snappdevelopment/JsonTree.gi
4246

4347
POM_DEVELOPER_ID=snappdevelopment
4448
POM_DEVELOPER_NAME=Sebastian Neubauer
45-
POM_DEVELOPER_URL=https://github.com/snappdevelopment/
49+
POM_DEVELOPER_URL=https://github.com/snappdevelopment/
50+
51+
# wasm falgs
52+
org.jetbrains.compose.experimental.jscanvas.enabled=true
53+
org.jetbrains.compose.experimental.wasm.enabled=true

gradle/libs.versions.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ agp = "8.5.2"
99
kotlin = "2.0.20"
1010
publish = "0.29.0"
1111
api-validator = "0.16.3"
12-
atomicfu = "0.22.0"
12+
atomicfu = "0.25.0"
1313
androidx-activity-compose = "1.9.2"
14-
kotlinx-serialization-json = "1.7.2"
15-
kotlinx-coroutines = "1.8.1"
14+
kotlinx-serialization-json = "1.7.3"
15+
kotlinx-coroutines = "1.9.0"
1616
detekt = "1.23.6"
1717

1818
[libraries]
@@ -35,4 +35,5 @@ compose = { id = "org.jetbrains.compose", version.ref = "compose" }
3535
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
3636
publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }
3737
api-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "api-validator" }
38-
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
38+
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
39+
kotlinx-atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "atomicfu" }

jsontree/build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
33
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
44

55
plugins {
66
alias(libs.plugins.kotlinMultiplatform)
77
alias(libs.plugins.android.library)
88
alias(libs.plugins.compose)
99
alias(libs.plugins.compose.compiler)
10-
id("kotlinx-atomicfu")
10+
alias(libs.plugins.kotlinx.atomicfu)
1111
alias(libs.plugins.publish)
1212
}
1313

@@ -30,6 +30,14 @@ kotlin {
3030
iosArm64()
3131
iosSimulatorArm64()
3232

33+
js {
34+
browser()
35+
useEsModules()
36+
}
37+
38+
@OptIn(ExperimentalWasmDsl::class)
39+
wasmJs { browser() }
40+
3341
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3442
compilerOptions {
3543
freeCompilerArgs.addAll("-Xexplicit-api=strict", "-Xjvm-default=all", "-opt-in=kotlin.RequiresOptIn")
@@ -98,6 +106,4 @@ android {
98106
minCompileSdk = libs.versions.android.minSdk.get().toInt()
99107
}
100108
}
101-
}
102-
103-
apply(plugin = "kotlinx-atomicfu")
109+
}

0 commit comments

Comments
 (0)