Skip to content

Latest commit

 

History

History
133 lines (98 loc) · 3.12 KB

development.md

File metadata and controls

133 lines (98 loc) · 3.12 KB

Development

Table of contents

Requirements

Test

For test the project you should run this command

$ ./gradlew cleanTest build test

Creating 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.0

Create the CHANGELOG.md file.

$ git cliff -o CHANGELOG.md

Alternatively you can use the action first-verion from the Makefile for create the first version.

$ make first-version

When 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.md

You can generate the changelog only for the current version.

$ git cliff --current

Alternatively you can use the action bump-verion from the Makefile for bump the version including updating the CHANGELOG.md

$ make bump-version

Publish 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-key

Get the GPG key id.

$ gpg -K

Upload 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.gpg

Edit or create the gradle.properties file with your favorite text editor.

$ vim ~/.gradle/gradle.properties

And 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 publishToCentralPortal

Publish to Maven local

$ ./gradlew publishToMavenLocal