open-meteo / open-meteo-api-kotlin

A Kotlin library for the Open-Meteo.com APIs.
MIT License
23 stars 2 forks source link

Publish to MavenCentral #8

Open LeoColman opened 9 months ago

LeoColman commented 9 months ago

Jitpack is awesome, but Maven Central is more usual for Kotlin users (we use it instead of Jitpack, for instance :P)

The process is easier than it looks. It requires proving domain ownership on a Jira ticket and uploading artifacts to a different repository.

I can help with the account setup and the repository adaptations if needed. A pet project of mine is published to Maven Central and it's very simple, so it can be used as a guide if one is needed: https://github.com/LeoColman/SimpleCpfValidator

DadiBit commented 9 months ago

Hi! Firstly, thank you again for the PRs.

I have no idea on how to publish on maven, but I would love to do it (perhaps the project needs some revival before that, tho). I do not have access to the domain configuration, but just like jitpack's custom domain (com.open-meteo.*) I asked Patrick Zippenfenig for collaboration and everything worked out smoothly.

We actually have the option to rename the package by shifting publishing channel, should we? Let me know wdyt 😃

LeoColman commented 9 months ago

Great! Good to know Patrick will be there when we need them :D

https://dev.to/julbrs/beginner-guide-to-maven-central-publishing-3jio

I think this tutorial summarizes a good start:


After this we can setup the project to publish in Sonatype's format, which involves including KotlinDocs (Dokka).

We actually have the option to rename the package by shifting publishing channel, should we? Let me know wdyt 😃

The current group is com.open-meteo and current artifact is open-meteo-api-kotlin.

Java seems to be published to Maven Central as com.open-meteo:sdk:1.4.0. I vote for keeping the group as com.open-meteo but changing the artifact to kotlin-sdk or sdk-kotlin

Python seems to publish to Pip as openmeteo-sdk. Python doesn't have a group level, I think.

Typescript seems to be publishing as openmeteo plain and simple.