I have an existing desktop utility app that uses J...
# compose-desktop
r
I have an existing desktop utility app that uses JavaFX for the UI. I would like to try converting it over to compose to see if it's a good fit. I did that several years ago with another app, and I remember it being rather simple, but it appears things have changed significantly since then. I'm not interested in multiplatform support as this will never run on anything other than the desktop, but all the documentation seems to be either for Android alone or for mutliplatform. Is there documentation somewhere I'm missing on how to do this? I swear there used to be a page about how to add compose-desktop to an existing app, but I'm having trouble finding it. There isn't even a template anymore for desktop only, which I'm almost certain there used to be.
👍 2
r
I'm in a similar situation and I simply did the multi-platform setup, but with the only target being JVM. I tore out anything else unrelated to desktop. I'd still be curious to hear any other more "official" answer
l
The template is now moved to a website https://kmp.jetbrains.com/ I remember used to see a news said that the template will come back to idea in future version soon.
r
@LurkyVAR That's the same multiplatform template I'm not interested in, but thanks anyway.
m
In the wizard you can just choose only desktop. I’ve used it quite a bit. It will only create a desktop app. For documentation it’s a bit scattered yes. I’ve mostly learned by doing things, sometimes the documentation from android works fine for compose elements since they are mostly the same, sometimes you need to look a bit further.
r
Again, still not helpful. That wizard creates a new project with a template and directory layout for multiplatform projects, even if only desktop is selected. I just want to incorporate compose into an existing project so I can work on moving the existing UI over from JavaFX. I do not want to make a new project or change directory structure of the existing one.
r
@Ruckus what build system does your existing project use? Is it on Gradle?
r
@rkechols Yes, the one I'm currently interested in uses Gradle. There is another one I've thought about doing the same to in the future as well if this one isn't too painful, but that one uses Maven and is still on Java 8, so it needs a lot of other work anyway.
r
Then you should be able to use the setup wizard to create a sample project for only desktop, look in the Gradle config files for Gradle plugins and project dependencies, and add those to your existing project's Gradle config
r
I thought I tried that and it didn't work due to a mismatch in directory structure that compose was expecting. Perhaps I'm misremembering. I'll try it again when I get the chance and see.
I guess I can try quick with a quick JavaFX hello world project. If that works, perhaps I have something unusual going on in the actual project.