Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ and store this in `_ci/google-services.json.gpg`.
The `decrypt_secrets.sh` will take it into account.
</details>

### Compose hot reload 🔥

<details>
<summary>See details…</summary>
It is possible to use [Compose hot reload](https://github.com/JetBrains/compose-hot-reload) on
desktop app by running the `:tasks-app-desktop:runHot` Gradle task.

You'll see a Compose icon near the top left corner of the window.

![](assets/compose-hot-reload-icon.png)

When clicking on it, it will open a new window with the hot reload status.

![](assets/compose-hot-reload-console.png)
</details>

## ⚖️ License

```
Expand Down
Binary file added assets/compose-hot-reload-console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/compose-hot-reload-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Olivier Patry
* Copyright (c) 2025 Olivier Patry
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -27,6 +27,7 @@ plugins {
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
alias(libs.plugins.jetbrains.kotlin.compose.compiler) apply false
alias(libs.plugins.jetbrains.compose) apply false
alias(libs.plugins.compose.hot.reload) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.androidx.room) apply false
alias(libs.plugins.android.application) apply false
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ coroutines = "1.10.2"
ktor = "3.1.3"
activity-compose = "1.11.0-rc01"
compose-plugin = "1.8.0"
compose-hot-reload-plugin = "1.0.0-alpha09"
compose-ui-preview = "1.8.0"
compose-m3-adaptive = "1.1.0"
room = "2.7.1"
Expand Down Expand Up @@ -106,6 +107,7 @@ jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"
jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
jetbrains-kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
compose-hot-reload = { id = "org.jetbrains.compose.hot-reload", version.ref = "compose-hot-reload-plugin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
androidx-room = { id = "androidx.room", version.ref = "room" }
google-services = { id = "com.google.gms.google-services", version = "4.4.2" }
Expand Down
6 changes: 5 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Olivier Patry
* Copyright (c) 2025 Olivier Patry
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -37,6 +37,10 @@ pluginManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0"
}

dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
Expand Down
11 changes: 11 additions & 0 deletions tasks-app-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ import com.mikepenz.aboutlibraries.plugin.DuplicateMode
import com.mikepenz.aboutlibraries.plugin.DuplicateRule
import com.mikepenz.aboutlibraries.plugin.StrictMode
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.compose.reload.ComposeHotRun
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag

plugins {
alias(libs.plugins.jetbrains.kotlin.jvm)
alias(libs.plugins.jetbrains.kotlin.compose.compiler)
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.about.libraries)
alias(libs.plugins.compose.hot.reload)
}

val appName = "Taskfolio"
Expand Down Expand Up @@ -71,6 +74,14 @@ kotlin {
}
}

composeCompiler {
featureFlags.add(ComposeFeatureFlag.OptimizeNonSkippingGroups)
}

tasks.withType<ComposeHotRun>().configureEach {
mainClass.set("MainAppKt")
}

compose.desktop {
application {
mainClass = "MainAppKt"
Expand Down
28 changes: 28 additions & 0 deletions tasks-app-desktop/src/main/resources/licenses_desktop.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,34 @@
"Apache-2.0"
]
},
{
"uniqueId": "org.jetbrains.compose.hot-reload:hot-reload-runtime-api",
"developers": [
{
"name": "JetBrains Team"
}
],
"artifactVersion": "1.0.0-alpha09",
"description": "Compose Hot Reload implementation",
"name": "hot-reload-runtime-api",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "org.jetbrains.compose.hot-reload:hot-reload-runtime-jvm",
"developers": [
{
"name": "JetBrains Team"
}
],
"artifactVersion": "1.0.0-alpha09",
"description": "Compose Hot Reload implementation",
"name": "hot-reload-runtime-jvm",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "org.jetbrains.compose.material3.adaptive:adaptive",
"developers": [
Expand Down
1 change: 1 addition & 0 deletions tasks-app-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ plugins {
alias(libs.plugins.jetbrains.kotlin.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.compose.hot.reload)
alias(libs.plugins.androidx.room)
alias(libs.plugins.android.library)
}
Expand Down