Hello.
I need to have a following structure:
- A base Kotlin native library which will have some abstract class
Pet
. It will target JS, Android, iOS and MacOS. Native apps will do something with these pets. - Then I should be able to create various separate Kotlin Native libraries with custom
Pet
subclasses - for exampleCat
,Dog
,Horse
. - Native apps should be able to use any kind of
Pet
.
How can this be achieved?
I’ve created a sample library with this wizard https://terrakok.github.io/kmp-web-wizard/ and it seems to work. Unfortunately I have absolutely no clue how to create this library hierarchy which I need. Tried creating separate module with base Pet but getting Gradle circular dependency errors during compilation.