223 questions
Best practices
0 votes
0 replies
41 views
How to include Java in this project and enable mixed development with both Java and Kotlin
How to include Java in this project and enable mixed development with both Java and Kotlin. I want to know how to use Java and Kotlin interoperably in a Kotlin Multiplatform Compose Desktop project, ...
2 votes
1 answer
202 views
How to include and play a Lottie animation in Compose Multiplatform?
How can I embed After Effects animations exported with Bodymovin extension as Lottie JSON format in a Compose Multiplatform app (Desktop/Windows/Linux/macOS, Android, iOS, Web/JS/WASM)? Is there a ...
0 votes
1 answer
94 views
How to include a custom folder into Compose for Desktop installer using Gradle?
I have a Kotlin Project using Compose for Desktop on Windows (IntelliJ). I built the installer with the Gradle tasks provided by the libary. When installing the program, I want the installer to copy a ...
0 votes
0 answers
71 views
Compose MissingResourceException in Jar plugin
I've got a compose multiplatform(desktop mainly) project with some UI packed to *.jar resources config for the feature project compose.resources { packageOfResClass = "com.sample.feature"...
1 vote
1 answer
72 views
What is the difference between application() and awaitApplication() in Compose Multiplatform Desktop?
There are two functions to be used as the entry point for a CMP desktop application: fun usage application() fun main() = application { ... } awaitApplication() suspend fun main() = awaitApplication { ...
1 vote
0 answers
46 views
Can't open gRPC channel after signing macOS application
I'm developing an application for macOS on Compose Desktop. Compose successfully executes Gradle tasks, but the application crashes on startup. The application must not be published to the App Store. ...
1 vote
1 answer
151 views
Kotlin Multiplatform pass (JVM) arguments to the app using Gradle
I'm trying to pass arguments to my Kotlin Multiplatform desktop app. I have this in my build.gradle.kts: tasks.withType<JavaExec> { args = listOf("test") } This is my Main.kt file:...
0 votes
1 answer
32 views
Thread.currentThread().contextClassLoader.getResource() can't get folder in Release
Use Intellij Idea Compose Desktop project Main.kt @Composable @Preview fun App() { MaterialTheme { Button( onClick = { val resource = Thread.currentThread() ...
0 votes
2 answers
118 views
Can't play sound file in Compose Desktop
I'm trying to play a WAV file using Java Clip val uri = Res.getUri("files/frog.wav") val audioInputStream = AudioSystem.getAudioInputStream(File(uri)) val clip: Clip = AudioSystem.getClip() ...
0 votes
0 answers
52 views
How to tell Proguard to obfuscate ONLY my package?
I have a Compose Desktop application with a lot of dependencies, and it's becoming difficult to make it work with Proguard. Everything works without it, but everything breaks with Proguard. I need to ...
1 vote
1 answer
84 views
How to solve this exception caused by Proguard
I'm getting this runtime exception when obfuscating with Proguard: Exception in thread "DefaultDispatcher-worker-2" com.fasterxml.jackson.c.a.S: Instantiation of [simple type, class com....
1 vote
0 answers
112 views
Failed to launch JVM after enabling proguard in Compose Desktop App
I'm trying to add proguard to my Compose Desktop app for obfuscating the code. I got a lot of proguard errors after enabling it, but after a lot of research I get rid of all of them adding a lot of ...
3 votes
2 answers
775 views
How to create MSI file with Compose Desktop
I'm trying to generate a .MSI file with my Compose Desktop app in Android Studio. I have this gradle: compose.desktop { application { mainClass = "com.helper.MainKt" ...
3 votes
1 answer
289 views
DataStore not working in Compose Desktop app
I'm using datastore in compose desktop kotlin multiplatform app: class DataStoreUseCase() { private val dataStore = createDataStore() suspend fun saveString(key: DataStoreKey, value: String) {...
0 votes
1 answer
77 views
Is it possible to get the packageVersion variable stored in build.gradle.kts file in Compose desktop?
In Compose desktop, you specify the app version here: compose.desktop { application { mainClass = "com.helper.MainKt" // ... nativeDistributions { ...