Is there a Multiplatform publication expert that c...
# multiplatform
e
Is there a Multiplatform publication expert that could give us a couple advices for GitHub Actions + Maven Central? Would be immensely appreciated 😆 https://github.com/Strumenta/antlr-kotlin/pull/107 Targets are JVM, JS and Native (for the enabled native targets, see here)
o
I could take a look if needed in coming days 🙂 Or you can look here for inspiration: • GitHub Actions workflow: https://github.com/whyoleg/cryptography-kotlin/blob/main/.github/workflows/publish-release.yml (everything is published from single macos host - I think, this should work at your side also) • gradle maven publish setup: https://github.com/whyoleg/cryptography-kotlin/blob/main/build-logic/src/main/kotlin/ckbuild.publish.gradle.kts (multiplatform plugin configures most of the things, for JVM plugin there will be needed some additional setup)
e
Ah damn completely forgot to reply, sorry. We're doing a bunch of tests but it's not easy lol, I didn't expect it to be this complex.
o
feel free to ping with questions if you need some help 🙂
e
@Oleg Yukhnevich see the last question that was posted on this channel by Federico
He's doing the tests
o
as far as I see in PR, he says that everything
seems work
with custom publish plugin 🙂
e
Ahh yup you're right, just noticed. I feel like it should work with the built in Maven publish plugin tho. But if that one is known and used in the community then I guess it's ok
o
yeah, this plugin just additionally configures
maven-publish
plugin At my side, I prefer not to use it, as it's rather easy to do it without it As I posted above, for multiplatform, I have single, rather small file with all logic needed for publication. For JVM you need only to create additional publication But, this plugin should also work, and I know a lot of libraries published with it
✔️ 1
e
Is there a way to test publishing to Central without actually publishing? I don't have an account there and obviously I don't want to publish, but I'd like to experiment too
o
not really there are 2 steps to check if everything is fine: 1. publish to maven local and check that everything works if to add it to dependencies to some artificial project 2. publish to maven central and check that there is no other errors in staging repository regarding signing, uploaded files and so on - so called maven central requirements
e
So after publish to staging, I can just get rid of everything, it's the same concept as for Git?
o
yeah staging repository on maven central can be closed (releasing version to public) or deleted (remove artifacts) you can also even add
staging
repository to you build script and check, that version uploaded to maven central is working (same as in step 1 above)
e
Ah, cool! Well thanks for all the clarifications! I'm just too used to publish to private repos lol, never tried Central.