Inside
"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.