From a26a364383386b86038991cf85aaf06cbe55be41 Mon Sep 17 00:00:00 2001 From: Kolchurin Konstantin Date: Wed, 2 Sep 2026 12:12:58 +0700 Subject: [PATCH] added info about default resource catalog in README --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d11c483b..270b762c 100755 --- a/README.md +++ b/README.md @@ -98,6 +98,37 @@ multiplatformResources { } ``` +#### Default resource source sets + +By default, resources for each Kotlin source set must be placed in +`src//moko-resources`. No additional `resourcesSourceSets` configuration is required. +For example, common resources belong in `src/commonMain/moko-resources`, Android-only resources in +`src/androidMain/moko-resources`, and common test resources in `src/commonTest/moko-resources`. + +The default common resource directory has the following structure: + +``` +projectDirectory +└── src + └── commonMain + └── moko-resources + ├── base + │ ├── strings.xml + │ └── plurals.xml + ├── + │ ├── strings.xml + │ └── plurals.xml + ├── images + ├── fonts + ├── files + └── assets +``` + +This directory layout was introduced in moko-resources 0.24.0. When upgrading from 0.23.x, move +resources from `src/commonMain/resources/MR` to `src/commonMain/moko-resources`; the directory +structure inside the resource root remains unchanged. See the +[0.24.0 changelog and migration guide](https://github.com/icerockdev/moko-resources/discussions/730). + #### Custom resource sourceSet If you need custom path for source of resources, you need add in plugin configuration resourcesSourceSets option: @@ -121,7 +152,7 @@ On next step, you must create inside of project directory folder with name: `cus -- customResources --- assets --- base ---- image +--- images ``` Example of custom sourceSet in: `resources-gallery` sample, inside `jvm-app`