https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

Ricky

08/18/2020, 7:51 PM
Is there a way to use KMP like this? having expect/actual would be really useful for this project.
🚫 2
r

russhwolf

08/18/2020, 8:10 PM
You can do it if
fabric
and
forge
are targets in a single gradle module, rather than their own separate modules. That might require a configuration like this https://kotlinlang.org/docs/reference/mpp-set-up-targets.html#distinguish-several-targets-for-one-platform
r

Ricky

08/18/2020, 8:24 PM
I need it to be separate projects because I need to use plugins one for forge and one for fabric and they conflict with each other.
r

russhwolf

08/18/2020, 8:26 PM
yeah, in that case you're out of luck. If you want to control things from your common module, define an interface the old-fashioned way and implement it in the other modules.