We have created a library that is built on our CI ...
# multiplatform
p
We have created a library that is built on our CI linux machine. That library has no specific ios dependencies and all the logic resides in commonMain. Am I correct that I can't use that library at all unless I buy a mac and add an empty nativeMain source set and publish that?
c
I believe you can get your iOS source and do the mac build into a virtual machine
a
You can use github-actions
b
You can build it on Azure DevOps. They offer some macOS hosts on free plan (that's what I'm doing) 🙂 Alternatively, hackintosh.
Github also provides same macos hosts as azure does (microsoft and all) as @aleksey.tomin mentioned
But in short, even if you do not have platform-specific dependencies you still must build an artifact for it on native host to make that platform available for your consumers.
I've posted a question on this earlier today https://kotlinlang.slack.com/archives/C0922A726/p1606212655188600
b
I can’t use that library at all unless I buy a mac and add an empty nativeMain source set and publish that
But the question remains: Can we use an empty
nativeMain
? Or alternatively can we use a prebuild
macOS
binary and use it to pass the tests?
b
Yes, you only need to declare ios target in your build. there's no need to have actual ios sources (as the artifact will be built from your common sources)
👍 1