Skip to content

Commit e8d8eb5

Browse files
committed
Enable compose hot reload
1 parent 3756c6b commit e8d8eb5

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

build-logic/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
// Hardcoded as this is upstream of the version catalog. Keep this in sync with that.
3-
kotlin("jvm") version "2.0.21" apply false
3+
kotlin("jvm") version "2.2.0" apply false
44
}
55

66
dependencyResolutionManagement {

gradle/libs.versions.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[versions]
22

3-
agpVersion = "8.8.0"
3+
agpVersion = "8.11.0"
44

55
compileSdk = "34"
66
minSdk = "24"
77
targetSdk = "33"
88

9-
jdk-target = "1.8"
9+
jdk-target = "11"
1010
jdk-toolchain = "17"
1111

1212
androidx-activity = "1.8.2"
@@ -46,19 +46,19 @@ filekit-dialogs-compose = "0.10.0-beta03"
4646

4747
google-accompanist = "0.18.0"
4848
google-dagger = "2.40.5"
49-
google-ksp = "2.0.21-1.0.26"
49+
google-ksp = "2.2.0-2.0.2"
5050
google-material = "1.4.0"
5151

5252
groovy = "3.0.9"
5353
jUnit = "4.13.2"
5454
java-diff-utils = "4.12"
5555
javaParser = "3.24.0"
56-
jetbrains-compose-plugin = "1.7.3"
56+
jetbrains-compose-plugin = "1.8.2"
5757
kgx = "0.1.12"
5858
kotest = "5.1.0"
5959
# Keep this in sync with what is hard-coded in build-logic/settings.gradle.kts as that is upstream
6060
# of loading the library versions from this file but should be the same.
61-
kotlin = "2.0.21"
61+
kotlin = "2.2.0"
6262

6363
kotlinx-binary-compatibility = "0.17.0"
6464
kotlinx-coroutines = "1.7.3"
@@ -95,9 +95,10 @@ timber = "5.0.1"
9595
truth = "1.4.4"
9696
turbine = "1.0.0"
9797
vanniktech-publish = "0.32.0"
98+
compose-hot-reload = "1.0.0-beta02"
9899

99100
[plugins]
100-
101+
compose-hot-reload = { id = "org.jetbrains.compose.hot-reload", version.ref = "compose-hot-reload" }
101102
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
102103

103104
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

workflow-trace-viewer/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
import org.jetbrains.compose.reload.gradle.ComposeHotRun
23

34
plugins {
45
id("kotlin-multiplatform")
56
alias(libs.plugins.jetbrains.compose)
67
alias(libs.plugins.compose.compiler)
8+
alias(libs.plugins.compose.hot.reload)
79
}
810

911
kotlin {
@@ -35,7 +37,12 @@ kotlin {
3537
}
3638
}
3739
}
38-
40+
tasks.withType<ComposeHotRun>().configureEach {
41+
mainClass.set("com.squareup.workflow1.traceviewer.MainKt")
42+
jvmArgs(
43+
"-Dapple.awt.application.appearance=system"
44+
)
45+
}
3946
compose {
4047
desktop {
4148
application {

0 commit comments

Comments
 (0)