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

Paul Woitaschek

11/24/2020, 10:30 AM
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

Cicero

11/24/2020, 10:36 AM
I believe you can get your iOS source and do the mac build into a virtual machine
a

aleksey.tomin

11/24/2020, 10:48 AM
You can use github-actions
b

Big Chungus

11/24/2020, 10:48 AM
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

BollywoodVillain

11/24/2020, 11:01 AM
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

Big Chungus

11/24/2020, 11:08 AM
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