refactor(commons): migrate from Moko to Compose Multiplatform Resources
Remove Moko Resources dependency that blocks AGP 9.0 migration. Migrate to built-in Compose Multiplatform Resources which is compatible with the new KMP Android plugin. - Remove moko-resources plugin and libraries from commons module - Move strings.xml from moko-resources/ to composeResources/values/ - Update imports from SharedRes.strings.* to Res.string.* - Add compose.components.resources dependency to desktopApp - Configure resource package as com.vitorpamplona.amethyst.commons.resources Closes #1675 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@ plugins {
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.jetbrainsComposeCompiler)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.mokoResources)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -81,9 +80,8 @@ kotlin {
|
||||
// Immutable collections
|
||||
api(libs.kotlinx.collections.immutable)
|
||||
|
||||
// Moko Resources for KMP string resources
|
||||
api(libs.moko.resources)
|
||||
api(libs.moko.resources.compose)
|
||||
// Compose Multiplatform Resources
|
||||
implementation(compose.components.resources)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +139,8 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
multiplatformResources {
|
||||
resourcesPackage.set("com.vitorpamplona.amethyst.commons")
|
||||
resourcesClassName.set("SharedRes")
|
||||
compose.resources {
|
||||
publicResClass = true
|
||||
packageOfResClass = "com.vitorpamplona.amethyst.commons.resources"
|
||||
generateResClass = always
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user