Development
Table of contents
Requirements
OpenJDK 21
jq - Install jq
Git cliff - Install git cliff
Make
Gradle 8.5 (wrapper is recommended)
Test
For test the project you should run this command
$ ./gradlew cleanTest build testCreating the Changelog
Before creating the CHANGELOG.md you should ensure you are using conventional commits.
You should create the tags following semantic versioning.
Create the first version tag.
$ git tag v0.0.0Create the CHANGELOG.md file.
$ git cliff -o CHANGELOG.mdAlternatively you can use the action first-verion from the Makefile for create the first version.
$ make first-versionWhen you have new commits for the new version you should calculate the new version before create the tag.
Calculate the new version and create the tag.
$ git tag v$(git cliff --unreleased --bump --context | jq -r '.[0].version')Update the CHANGELOG.md.
$ git cliff --bump -o CHANGELOG.mdYou can generate the changelog only for the current version.
$ git cliff --currentAlternatively you can use the action bump-verion from the Makefile for bump the version including updating the CHANGELOG.md
$ make bump-versionPublish artifacts
⚠️ CAUTION ⚠️
The artifacts should be published only by the owner of the repository.
Before publish you need to create the gradle.properties file on the .gradle directory on your home directory and create the GPG keys.
Create the GPG keys.
$ gpg --gen-keyGet the GPG key id.
$ gpg -KUpload the keys to the ubuntu keyserver.
$ gpg --keyserver keyserver.ubuntu.com --send-keys <your gpg key id>Export the secret keys to a keyring on your home directory.
$ gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpgEdit or create the gradle.properties file with your favorite text editor.
$ vim ~/.gradle/gradle.propertiesAnd put the following content at the end of the file.
signing.keyId=<the last 8 digits of the key id>
signing.password=<your gpg key passphrase>
signing.secretKeyRingFile=<absolute path to your home directory>/.gnupg/secring.gpg
centralPortal.username=<sonatype user token>
centralPortal.password=<sonatype password token>If you want to publish a gradle plugin you need to append the following content. You may find your keys on the user page of the Gradle Plugin Portal
gradle.publish.key=<your publish key>
gradle.publish.secret=<your publish secret>Publish to Sona Type (Maven central)
$ ./gradlew publishToCentralPortalPublish to Maven local
$ ./gradlew publishToMavenLocalLast updated