-
Notifications
You must be signed in to change notification settings - Fork 317
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
Conversation
775cfb8
to
de17d39
Compare
import androidx.compose.ui.window.rememberWindowState | ||
import org.jetbrains.compose.reload.DevelopmentEntryPoint | ||
|
||
fun main() { |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely fair!
settings.gradle.kts
Outdated
@@ -9,6 +9,7 @@ pluginManagement { | |||
google() | |||
gradlePluginPortal() | |||
mavenCentral() | |||
maven("https://repo.sellmair.io") |
There was a problem hiding this comment.
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 👀
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! LGTM
Please consider adding the PR description |
75629b4
to
f26f43e
Compare
f26f43e
to
2669343
Compare
2669343
to
e58a25a
Compare
Sets up the experimental compose-hot-reload plugin in the
ui-components
module to allow quicker development of components.