A Gradle plugin that enables use of Compose-style resource directories for non-Compose KMP targets.
I created this library for Lifelog. Lifelog has a plugin system which allows additional functionality to be provided in isolated modules, and these modules conventionally support all KMP targets because the plugin system is part of the specification (core) module, and the specification module supports all KMP targets.
I had no issues while writing the specification module as the module itself contains no user-strings, these are all provided by the application module. However, because plugins are isolated modules and the application and specification have no knowledge of them, the plugins must provide their own localises strings for any user-facing types they register. This meant I needed a solution for storing strings in a KMP-compatible way.
I could have just stored the strings in Kotlin source code as string literals, as I’ve done in some projects before (like spmp-server), but because the project already contained a fair few Compose string resource XML files, I wanted to remain consistent with those. Thus, I created this library which more of less copies what Compose does but works with all KMP targets.