Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jetbrains/compose-hot-reload
Compose Hot Reload
https://github.com/jetbrains/compose-hot-reload
compose compose-desktop compose-hot-reload compose-multiplatform firework hot-reload kotlin
Last synced: 4 days ago
JSON representation
Compose Hot Reload
- Host: GitHub
- URL: https://github.com/jetbrains/compose-hot-reload
- Owner: JetBrains
- Created: 2024-10-17T14:40:37.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-01-10T14:55:20.000Z (12 days ago)
- Last Synced: 2025-01-12T07:02:36.796Z (11 days ago)
- Topics: compose, compose-desktop, compose-hot-reload, compose-multiplatform, firework, hot-reload, kotlin
- Language: Kotlin
- Homepage:
- Size: 1.3 MB
- Stars: 582
- Watchers: 14
- Forks: 19
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π₯ Compose Hot Reload
[![JetBrains team project](https://jb.gg/badges/incubator.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
## Intro
This repository contains recent experiments for Hot Reloading Compose Applications.
The intent is to upstream this repository into an official JetBrains product.No guarantees apply.
## State
The project publishes experimental builds
### Add the 'firework' maven repository
(settings.gradle.kts)
```kotlin
pluginManagement {
repositories {
maven("https://packages.jetbrains.team/maven/p/firework/dev")
}
}dependencyResolutionManagement {
repositories {
maven("https://packages.jetbrains.team/maven/p/firework/dev")
}
}```
### Apply the Gradle plugin to your project
```kotlin
plugins {
kotlin("multiplatform") version "2.1.10-firework.33" // <- Use special builds of Kotlin
kotlin("plugin.compose") version "2.1.10-firework.33" // <- Use special builds of Kotlin/Compose Compiler
id("org.jetbrains.compose")
id("org.jetbrains.compose-hot-reload") version "1.0.0-dev.33.2" // <- add this additionally
}
```### Enable 'OptimizeNonSkippingGroups' in your build.gradle.kts
```kotlin
composeCompiler {
featureFlags.add(ComposeFeatureFlag.OptimizeNonSkippingGroups)
}
```### Optional: Create a custom entry point to launch your hot application
```kotlin
// build.gradle.kts
tasks.register("runHot") {
mainClass.set("my.app.MainKt")
}
```#### π‘The JBR can also be downloaded automatically by Gradle (foojay)
https://github.com/gradle/foojay-toolchains
```kotlin
// settings.gradle.kts
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}
```### Provide an Entry Point for your UI to hot-reload
```kotlin
@Composable
fun App() {
DevelopmentEntryPoint {
MainPage()
}
}
```