Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor publishing to Maven Central #43

Merged
merged 3 commits into from
Aug 26, 2022

Conversation

ntoskrnl
Copy link
Contributor

@ntoskrnl ntoskrnl commented Aug 23, 2022

Use plugin: https://github.com/vanniktech/gradle-maven-publish-plugin

It's a wrapper around Gradle Maven Publish plugin that makes publishing to Maven Central easier. Many open-source libraries have moved to it, for example Accompanist, OkHttp and others.

Why do we need this?

For this library it mainly brings ability to publish to Maven Central from command line without having to go to the Sonatype website.

./gradlew publish --no-daemon --no-parallel
./gradlew closeAndReleaseRepository

This is a step towards automated releases via Github Actions.

There are 2 ways to configure it. I currently do it dynamically via base plugin config in publish-setup.gradle and then in each published module build.gradle.

I think we might rewrite it into using Gradle properties (there are more examples of it in other OSS projects). But for now it should already work.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to upgrade Gradle (min required version is 7.2.0)
Now it is probably required to use JDK 11 to build the library (but I'm not sure). Shouldn't affect anything else, only the compilation.

@ntoskrnl ntoskrnl marked this pull request as ready for review August 26, 2022 13:55
@FZambia
Copy link
Member

FZambia commented Aug 26, 2022

Thanks a lot!

@FZambia FZambia merged commit 8ccc345 into centrifugal:master Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants