hi, I am currently developing a kotlin multiplatfo...
# multiplatform
s
hi, I am currently developing a kotlin multiplatform library and I wish to publish it. however, I cannot build it for ios/osx due to not having a mac at my disposal. if I publish it without building for ios/osx, will ios/osx consumers still be able to use the library? I would like to note, the project currently contains no platform-specific code, and the entirety of the codebase is in the common module. Does this make a difference? Because, with this, the IR will be published, so ios/osx consumers should still be able to use it, no? if I need to, I will spend the time to set up a macos node for jenkins to build it for me, however I'd rather not have to do that.
^ also, currently I have the kotlin/jvm platform configured but not a platform for android. Do I need to configure/publish that as well? or, will android consumers be able to use the kotlin/jvm platform?
f
You need a Mac to build the library for ios/macOs. This is a restriction by Apple. Android can consume Jvm libraries
☝️ 1
s
ah, I see. if anyone happens to have some good tutorials on-hand I can reference for creating a macos jenkins node on a linux machine, that would be amazing
c
Will this library be open source? github actions has free runners for open source projects, so using their macOS runner would be the easiest place to start.
plus1 2
s
the library is already open source (https://github.com/solo-studios/kt-fuzzy). You can look at my buildscripts there. However, I would prefer to decrease my dependence on github rather than increasing it. I would much prefer to run it on my own server, if at all possible.
c
You can set up your mac as a self-hosted github runner. But that seems like a lot of extra work. I’d start with using github’s runners, then transition if you’re really set on doing this on your own. This repo gets you most of the way there for multiplatform deployment to maven central. (It doesn’t deploy the apple targets but that’s basically just changing the github workflow to use macOS-latest instead of ubuntu-latest and feature flagging on the native targets which were disabled because we didn’t want to officially support them yet)
s
see, the thing is, I don't own a mac. Which is why I want to run it under docker or kvm on my jenkins ci
c
If you don’t have a mac, then you need to use github actions (or another hosted mac).
Compiling for Apple must be done on a Mac.
Building Apple targets requires Xcode and Apple’s build tools, which do not run on Linux or Windows.
Hosted macOS runners are expensive, and I’m really trying to help you find a quick, free, and easy path forward.
s
Compiling for Apple must be done on a Mac.
yes, which is why I'm looking to make a hackintosh jenkins node
Hosted macOS runners are expensive, and I’m really trying to help you find a quick, free, and easy path forward.
I already selfhost a jenkins ci instance (https://ci.solo-studios.ca), and am looking to run the compilation on there.
if I have to use gh runners, then I will, however I would much prefer to run it on my ci server.
m
Also note that GH still does not provide macOS runners for ARM based macOS.
c
Intel Macs can still compile the Apple Silicon binaries though—you just can’t execute them for testing.
m
Do you know of any tutorial which would guide me on cross-compiling a Compose application/library for ARM from Intel?
s
it should just do that by default afaik ?