kotlin-libui icon indicating copy to clipboard operation
kotlin-libui copied to clipboard

Release on maven central?

Open ScottPierce opened this issue 3 years ago • 10 comments

This is awesome that you've put this project together and continue to maintain it. I'm trying to think of an easy way to add it to an app, and it's not an easy process. It'd be amazing if this were on maven central so we could pull it naturally as a dependency!

ScottPierce avatar Aug 10 '22 02:08 ScottPierce

Well sorry I just never published anything on maven central. Do you know any relatively simple project that can be used as a template for publishing from GitHub CI?

msink avatar Aug 10 '22 04:08 msink

I followed https://dev.to/kotlin/how-to-build-and-publish-a-kotlin-multiplatform-library-going-public-4a8k for my matrix-kt project. (Check the last few commits on the master branch) It similar to yours as it has bindings. Besides having a lot of files it's fairly simple on the gradle side of things. Feel free to ping me on Slack (or here I guess) if you have questions and I might be able to answer them 🙂.

Dominaezzz avatar Aug 10 '22 09:08 Dominaezzz

The annoying part is that you have to get permission for a group ID with sonatype. You can use the com.github version of your domain to publish the artifact though.

On Wed, Aug 10, 2022, 5:22 AM Dominic Fischer @.***> wrote:

I followed https://dev.to/kotlin/how-to-build-and-publish-a-kotlin-multiplatform-library-going-public-4a8k for my matrix-kt project. (Check the last few commits on the master branch) It similar to yours as it has bindings. Besides having a lot of files it's fairly simple on the gradle side of things. Feel free to ping me on Slack (or here I guess) if you have questions and I might be able to answer them 🙂.

— Reply to this email directly, view it on GitHub https://github.com/msink/kotlin-libui/issues/49#issuecomment-1210400661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUWAL4DZJSCZVF7KDU75LVYNYEPANCNFSM56C3D3IA . You are receiving this because you authored the thread.Message ID: @.***>

ScottPierce avatar Aug 10 '22 22:08 ScottPierce

I think Jitpack website is a easier way than publishing in the maven central.

You can publish a java/kotlin library in this website by creating a release in github,Why not think about this?

stars-one avatar Sep 16 '22 06:09 stars-one

I just absolutely didn't have time last month, sorry. And hope Kotlin 1.7.20 will be finally released today or next week, and plan to upgrade to it before publishing to maven central.

msink avatar Sep 16 '22 07:09 msink

I just absolutely didn't have time last month, sorry. And hope Kotlin 1.7.20 will be finally released today or next week, and plan to upgrade to it before publishing to maven central.

I appreciate the update

ScottPierce avatar Sep 16 '22 12:09 ScottPierce

Hi 👋 I'd like to be able to help with this. I've configured a few Kotlin multiplatform projects, (kxs-ts-gen and ks3) for Maven Central publishing.

There are a few gotchas that can really cause trouble.

  1. Maven Central requires a Javadoc jar, even if the publication includes a sources jar. The best workaround is to publish an empty Javadoc jar.
  2. Maven Central requires all published artifacts are signed. This can be difficult to set up in Gradle, because the signing plugin hasn't been maintained. Try having a look at the config here for the workaround.
  3. Disabling duplicate publications can be difficult (although it seems like you already have config for that).

If you like I can create a PR that re-implements the same logic as in ks3? This will involved some refactoring of the build logic though, by creating Gradle buildSrc convention plugins to make the build logic more modular.

aSemy avatar Dec 03 '22 16:12 aSemy

I'd be glad to offer a repo for publishing in the meanwhile, if this helps

elect86 avatar Dec 19 '23 11:12 elect86