diff --git a/topics/compose/compose-multiplatform-resources-setup.md b/topics/compose/compose-multiplatform-resources-setup.md index 69392679..2cd9c641 100644 --- a/topics/compose/compose-multiplatform-resources-setup.md +++ b/topics/compose/compose-multiplatform-resources-setup.md @@ -9,7 +9,7 @@ To properly configure the project to use multiplatform resources: 3. Create additional directories for qualified resources (for example, different images for the dark UI theme or localized strings). -## Dependency and directory setup +## Build script and directory setup To access resources in your multiplatform projects, add the library dependency and organize files within your project directory: @@ -79,6 +79,21 @@ compose.resources { ``` {initial-collapse-state="collapsed" collapsible="true" collapsed-title="directoryProvider = tasks.register"} +### Resources in the `androidLibrary` target + + +Starting with the Android Gradle plugin version 8.8.0, you can use the generated `Res` class +and resource accessors in the `androidLibrary` target. +To enable support for multiplatform resources in `androidLibrary`, update your configuration as follows: + +``` +kotlin { + androidLibrary { + experimentalProperties["android.experimental.kmp.enableAndroidResources"] = true + } +} +``` + ## Qualifiers Sometimes, the same resource should be presented in different ways depending on the environment, such as locale, diff --git a/topics/whats-new/whats-new-compose-180.md b/topics/whats-new/whats-new-compose-180.md index 42de843d..a72a45c1 100644 --- a/topics/whats-new/whats-new-compose-180.md +++ b/topics/whats-new/whats-new-compose-180.md @@ -394,6 +394,7 @@ improving the overall experience of building and running applications on ARM-bas ## Gradle plugin ### Support for multiplatform resources in the `androidLibrary` target + Starting with the Android Gradle plugin version 8.8.0, you can use generated assets in the new `androidLibrary` target. To align Compose Multiplatform with these changes, we’ve introduced support for a new target configuration to work with