File tree Expand file tree Collapse file tree 4 files changed +11
-3088
lines changed Expand file tree Collapse file tree 4 files changed +11
-3088
lines changed Original file line number Diff line number Diff 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 >  ; <br >
7171
7272 Once the application starts, open the following URL in your browser:
Original file line number Diff line number Diff line change 1+ @file:OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl ::class )
2+
13import org.jetbrains.compose.desktop.application.dsl.TargetFormat
24import 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
67plugins {
78 alias(libs.plugins.kotlinMultiplatform)
@@ -12,10 +13,8 @@ plugins {
1213
1314kotlin {
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+ }
Original file line number Diff line number Diff line change 11[versions ]
2- compose = " 1.7.0 "
2+ compose = " 1.8.2 "
33agp = " 8.1.4"
44android-minSdk = " 24"
55android-compileSdk = " 34"
@@ -11,7 +11,7 @@ androidx-material = "1.10.0"
1111androidx-constraintlayout = " 2.1.4"
1212androidx-test-junit = " 1.1.5"
1313androidx-espresso-core = " 3.5.1"
14- kotlin = " 2.0 .10"
14+ kotlin = " 2.2 .10"
1515junit = " 4.13.2"
1616
1717[libraries ]
You can’t perform that action at this time.
0 commit comments