From 1fb4470c8b21ae706bc26c0ca036a81ed2db2332 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Tue, 19 Apr 2022 14:07:59 +0300 Subject: [PATCH] Update README.md --- tutorials/Image_And_Icons_Manipulations/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tutorials/Image_And_Icons_Manipulations/README.md b/tutorials/Image_And_Icons_Manipulations/README.md index 653db7a3e0..9630adb839 100755 --- a/tutorials/Image_And_Icons_Manipulations/README.md +++ b/tutorials/Image_And_Icons_Manipulations/README.md @@ -311,3 +311,12 @@ fun main() = application { ``` Tray icon + +## Loading image resources in commonMain +Currently, Compose Multiplatform doesn't support loading resources from commonMain sourceSet. You can track this feature [here](https://github.com/JetBrains/compose-jb/issues/1255). + +Until then, there is a workaround for loading resources from `commonMain/resources` folder: +[build.gradle](https://github.com/JetBrains/compose-jb/blob/dc0335b210f5e0b3bb02325dc690e4e39f9fe1f4/examples/widgets-gallery/common/build.gradle.kts#L52) +[commonMain](https://github.com/JetBrains/compose-jb/blob/dc0335b210f5e0b3bb02325dc690e4e39f9fe1f4/examples/widgets-gallery/common/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/Resources.kt#L7) +[desktopMain](https://github.com/JetBrains/compose-jb/blob/dc0335b210f5e0b3bb02325dc690e4e39f9fe1f4/examples/widgets-gallery/common/src/desktopMain/kotlin/org/jetbrains/compose/demo/widgets/platform/Resources.kt) +[androidMain](https://github.com/JetBrains/compose-jb/blob/dc0335b210f5e0b3bb02325dc690e4e39f9fe1f4/examples/widgets-gallery/common/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/Resources.kt)