Skip to content

Commit eeb2da6

Browse files
committed
Update kotlin to 2.2.10 and small fixes
1 parent 5014083 commit eeb2da6

File tree

4 files changed

+11
-3088
lines changed

4 files changed

+11
-3088
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To build and run the application:
6666

6767
* **Web version:**
6868

69-
`./gradlew :composeApp:wasmJsRun`
69+
`./gradlew :composeApp:wasmJsBrowserProductionRun`
7070
<br>&nbsp;<br>
7171

7272
Once the application starts, open the following URL in your browser:

composeApp/build.gradle.kts

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
@file:OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
2+
13
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
24
import org.jetbrains.compose.ExperimentalComposeLibrary
3-
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
4-
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
5+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
56

67
plugins {
78
alias(libs.plugins.kotlinMultiplatform)
@@ -12,10 +13,8 @@ plugins {
1213

1314
kotlin {
1415
androidTarget {
15-
compilations.all {
16-
kotlinOptions {
17-
jvmTarget = "1.8"
18-
}
16+
compilerOptions {
17+
jvmTarget.set(JvmTarget.JVM_18)
1918
}
2019
}
2120

@@ -32,21 +31,9 @@ kotlin {
3231
}
3332
}
3433

35-
@OptIn(ExperimentalWasmDsl::class)
3634
wasmJs {
37-
moduleName = "composeApp"
38-
browser {
39-
commonWebpackConfig {
40-
outputFileName = "composeApp.js"
41-
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
42-
static = (static ?: mutableListOf()).apply {
43-
// Serve sources to debug inside browser
44-
add(project.rootDir.path)
45-
add(project.projectDir.path)
46-
}
47-
}
48-
}
49-
}
35+
outputModuleName = "composeApp"
36+
browser()
5037
binaries.executable()
5138
}
5239

@@ -115,8 +102,4 @@ compose.desktop {
115102
packageVersion = "1.0.0"
116103
}
117104
}
118-
}
119-
120-
compose.experimental {
121-
web.application {}
122-
}
105+
}

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
compose = "1.7.0"
2+
compose = "1.8.2"
33
agp = "8.1.4"
44
android-minSdk = "24"
55
android-compileSdk = "34"
@@ -11,7 +11,7 @@ androidx-material = "1.10.0"
1111
androidx-constraintlayout = "2.1.4"
1212
androidx-test-junit = "1.1.5"
1313
androidx-espresso-core = "3.5.1"
14-
kotlin = "2.0.10"
14+
kotlin = "2.2.10"
1515
junit = "4.13.2"
1616

1717
[libraries]

0 commit comments

Comments
 (0)