![]() ![]() ![]() Any JVM library used there will need to be replaced by a multiplatform equivalent, or a native equivalent will need to be added for the native target. I guess your best option here (if you control the JVM module) is to turn your JVM module into a multiplatform one as well. Since it will be running on iOS, there is no way that module can transitively use a JVM one (it won't have a JVM runtime). If you want to use a multiplatform library from a platform specific module like iOS, that "consumer" module will only have access to the common code and the iOS-specific code of the multiplatform library. But note that this dependency will only be available to the JVM "flavour" of the multiplatform library, not to the iOS one. In a multiplatform module, you can only depend on JVM modules from the JVM source set. Multiplatform modules have different source sets: common, JVM, JS, and native ones like iOS. If your intention is to use a JVM module transitively from a native module, it's simply not possible. I'm not sure I completely understand your question here. How can I import JVM module to multiplatform module? No matter how I try to use myJvmModule as dependency, I always receive error:Ĭould not resolve company:myJvmModule:0.0.1 Implementation(group = "", name = "jackson-module-kotlin", version = fasterXmlVersion) Implementation(project(":myAnotherModule2")) Implementation(project(":myAnotherModule")) To create multiplatform/ios version of it, I've created separated module with : plugins ĭistributionType = īesides that, myJvmModule has : val fasterXmlVersion: String by project Lib is written in plain Kotlin and it consists of 3 modules, dependent from each other. I've built a lib in Kotlin, which I would like to use in Kotlin backend, Android app & in swift ios app. ![]()
0 Comments
Leave a Reply. |