How can I modify the default configuration file generated by Gradle (command-line) to build a desktop app using Compose

I assume you mean Compose Desktop, because there is no such thing as “just desktop application” in Java/Kotlin.

Yes, there is such option and it is described in the documentation very extensively: compose-jb/README.md at master · JetBrains/compose-jb · GitHub . I see there is even an option to produce a fat jar you asked for:

./gradlew packageUberJarForCurrentOS

Note that Compose Desktop internally uses native libraries for its UI, these apps are not pure-Java, so they are not multi-platform, they are less standard and building them is more complicated, at least internally.

2 Likes