A simple gradle plugin that enables the use of Kotlin Multiplatform's expect/actual declarations in Architectury projects, instead of using Architectury Transformer and the @ExpectPlatform annotation.
Put this in your root build.gradle.kts
and make sure you have Architectury Loom configured in compile only mode, or forge like projects will not work. Look on the Architectury wiki for how to do that.
plugins {
id("com.withertech.architectury.kotlin.plugin") version "<version>" apply false
}
subprojects {
apply(plugin = "com.withertech.architectury.kotlin.plugin")
}
Then you should be able to use kotlin multiplatform expect/actual syntax with Architectury! Note that because you must put loom in compile only mode, you will not have access to Architectury Injectables, so you will have to implement ArchitecturyTarget yourself if you want to be able to get the current platform string, but that should be easy with expect/actual.
Feel free to open a issue or submit a pull request for any bugs/improvements.
This plugin is licensed under the MIT License - see the License file for details