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:
66
66
67
67
* ** Web version:**
68
68
69
- ` ./gradlew :composeApp:wasmJsRun `
69
+ ` ./gradlew :composeApp:wasmJsBrowserProductionRun `
70
70
<br >  ; <br >
71
71
72
72
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
+
1
3
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2
4
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
5
6
6
7
plugins {
7
8
alias(libs.plugins.kotlinMultiplatform)
@@ -12,10 +13,8 @@ plugins {
12
13
13
14
kotlin {
14
15
androidTarget {
15
- compilations.all {
16
- kotlinOptions {
17
- jvmTarget = " 1.8"
18
- }
16
+ compilerOptions {
17
+ jvmTarget.set(JvmTarget .JVM_18 )
19
18
}
20
19
}
21
20
@@ -32,21 +31,9 @@ kotlin {
32
31
}
33
32
}
34
33
35
- @OptIn(ExperimentalWasmDsl ::class )
36
34
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()
50
37
binaries.executable()
51
38
}
52
39
@@ -115,8 +102,4 @@ compose.desktop {
115
102
packageVersion = " 1.0.0"
116
103
}
117
104
}
118
- }
119
-
120
- compose.experimental {
121
- web.application {}
122
- }
105
+ }
Original file line number Diff line number Diff line change 1
1
[versions ]
2
- compose = " 1.7.0 "
2
+ compose = " 1.8.2 "
3
3
agp = " 8.1.4"
4
4
android-minSdk = " 24"
5
5
android-compileSdk = " 34"
@@ -11,7 +11,7 @@ androidx-material = "1.10.0"
11
11
androidx-constraintlayout = " 2.1.4"
12
12
androidx-test-junit = " 1.1.5"
13
13
androidx-espresso-core = " 3.5.1"
14
- kotlin = " 2.0 .10"
14
+ kotlin = " 2.2 .10"
15
15
junit = " 4.13.2"
16
16
17
17
[libraries ]
You can’t perform that action at this time.
0 commit comments