Skip to content

sellmair/compose-hot-reload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Compose Hot Reload Experiments

JetBrains team project

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 'sellmair' maven repository

(settings.gradle.kts)

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

plugins {
    kotlin("multiplatform") version "2.0.21-firework.28" // <- Use special builds of Kotlin
    kotlin("plugin.compose") version "2.0.21-firework.28" // <- Use special builds of Kotlin/Compose Compiler
    id("org.jetbrains.compose")
    id("org.jetbrains.compose-hot-reload") version "1.0.0-dev.28.4" // <- add this additionally
}

Optional: Create a custom entry point to launch your hot application

// build.gradle.kts
tasks.register<ComposeHotRun>("runHot") {
    mainClass.set("my.app.MainKt")
}

💡The JBR can also be downloaded automatically by Gradle (foojay)

https://github.com/gradle/foojay-toolchains

// 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

@Composable 
fun App() {
    DevelopmentEntryPoint {
        MainPage()
    }
}

About

Experimental: JetBrains Compose Hot Reload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages