Hi, I'm trying to get GitHub Actions to build and ...
# multiplatform
r
Hi, I'm trying to get GitHub Actions to build and deploy multiple build variants (native targets, and JVM target version) to maven central. I'm running each of these as a separate build and deployment to maven local, but I'm running into a couple of issues: 1. I'm passing "native" as the taret name on each platform in order to simplify the build configuration, gradle task names, and GitHub Actions. -- I think I can fix this by using the default names, with a more complex build script. 2. The core package only lists one of the native variants.
In order to get the top-level package to list all the variants, do I need to specify those explicitly in my configuration? I.e.:
Copy code
kotlin.mingwX64()
kotlin.linuxX64()
kotlin.iosX64()
kotlin.iosArm64()
// etc.
It looks as if that is the case, but in adding all the native variants, I get an error that certain hosts need the correct native host (e.g. iosX64 needs a Mac OS X host). -- How do I get the maven central publication to know about all the possible variants when building/deploying the kotlinMultiplatform package?
m
I compile everything on a single MacOS machine, it simplifies the process a lot.
If you want to publish to maven central from different machines, look into https://github.com/nexus-actions/create-nexus-staging-repo
r
Compiling on a single MacOS machine means that you cannot build various linux and windows targets (at least be able to run the tests). And having the release split is not a problem -- I can close and release each individually. The issue is adding the targets not supported for a given host to be added to the variant list of the multiplatform project. So, unless you can add all targets when running on Mac OS (so I can deploy multiplatform from macos-latest), then that won't work. -- It also makes it harder to test locally, as I only have access to macos via GitHub Actions.