Guilherme Delgado
05/26/2022, 6:29 PM"src/jvmMain/resources"
I’ve my resources. If I run ./gradlew run
the app launches and I can use them, example: playSound(File("src/jvmMain/resources/sound.wav"))
. But when I create a distribution or a package those resources aren’t included. I can see them inside build/processedResources
but not in /build/compose/binaries/main/app/MyApp.app/Contents/app/resources
. I’ve tried this:
with(project.file("src/jvmMain/resources")) {
macOS { iconFile.set(resolve("icon.icns")) }
linux { iconFile.set(resolve("icon.png")) }
windows { iconFile.set(resolve("icon.ico")) }
appResourcesRootDir.set(project.layout.projectDirectory.dir(this.path)) //<<<<<<<<<<<<<
}
But with no luck, still can’t “find them”. Funny thing, the icons (iconFile
) are found and used 🤷♂️
Any hint? Thanks. I was looking into this docs.Michael Paus
05/26/2022, 8:45 PM/sound.wav
without the src/jvmMain/resources
part.Guilherme Delgado
05/27/2022, 10:10 AMAdding files to packaged application
Guilherme Delgado
05/27/2022, 10:11 AMMichael Paus
05/27/2022, 10:38 AM