Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hot reload plugin #174

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Add hot reload plugin #174

merged 3 commits into from
Nov 20, 2024

Conversation

zsmb13
Copy link
Contributor

@zsmb13 zsmb13 commented Nov 18, 2024

Sets up the experimental compose-hot-reload plugin in the ui-components module to allow quicker development of components.

@zsmb13 zsmb13 requested review from kropp and e5l and removed request for kropp November 18, 2024 23:18
@zsmb13 zsmb13 force-pushed the compose-hot-reload branch 4 times, most recently from 775cfb8 to de17d39 Compare November 18, 2024 23:26
import androidx.compose.ui.window.rememberWindowState
import org.jetbrains.compose.reload.DevelopmentEntryPoint

fun main() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do not want this code to be in your production sources, feel free to put them into the 'jvmDev' source set 👍 ! I think launching the code then requires the IDE plugin from Kostya or a cli command that I could provide!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also could have a Gradle task for this in the plugin :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh there is a task:

gw :app:devRun -DclassName=my.pkg.ClassNameKt -DfunName=MyComposable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely prefer an easily clickable main function for the time being, just to keep things super simple, but we can revisit this later. A saved run config would make it fairly painless to launch the task above, for example.

I'm also still thinking about what entry point to provide exactly though, whether it should be a bunch of small ones for components, or if we should have a "gallery app" entry point where you can go through all of them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely fair!

@@ -9,6 +9,7 @@ pluginManagement {
google()
gradlePluginPortal()
mavenCentral()
maven("https://repo.sellmair.io")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should try to push the next builds to JetBrains infrastructure 👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just publish it to the maven central? With the new portal it should be simple

Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice! LGTM

@e5l
Copy link
Member

e5l commented Nov 19, 2024

Please consider adding the PR description

@sellmair
Copy link
Member

@zsmb13 : Just wanted to let you know, that I published new builds
d3836a9

This will be dev-28 for hot reload and 2.0.21-firework.28 for Kotlin

@zsmb13 zsmb13 force-pushed the compose-hot-reload branch 2 times, most recently from 75629b4 to f26f43e Compare November 20, 2024 10:33
Base automatically changed from components-2 to kotlinconf-2025 November 20, 2024 13:24
@zsmb13 zsmb13 marked this pull request as ready for review November 20, 2024 13:24
@zsmb13 zsmb13 merged commit 6a3af90 into kotlinconf-2025 Nov 20, 2024
5 checks passed
@zsmb13 zsmb13 deleted the compose-hot-reload branch November 20, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants