Skip to content
Jed Simson edited this page Oct 24, 2021 · 8 revisions

Overview

The following Gradle tasks can be used to build varying configurations of the project:

  • build: Builds the main artifact, comprised of the nz.co.jedsimson.lgp.core binaries
  • coreJar: Builds a fat JAR artifact, comprised of the nz.co.jedsimson.lgp.core and all dependency binaries
  • sourcesJar: Builds an artifact comprised of the project source files
  • javaDocsJar: Builds an artifact comprised of JavaDoc files
  • kotlinDocsJar: Builds an artifact comprised of KDoc files

Workflows

The LGP project uses GitHub Actions for its continuous integration workflows.

The workflows will ensure that the project builds and that all tests succeed. This is used as a check for any changes made to the project.

There are three workflows that the project will use - CI, Release, and Publish.

CI

The CI workflow is configured to run whenever changes are pushed to any branch other than master. This ensures that:

  1. Any new code added will be built in the build environment to ensure that changes that worked locally don't break anything
  2. All automated tests past with the latest changes
  3. Test coverage has not decreased

Release

The Release workflow is nearly identical to the CI workflow. The only exception being that it will only be triggered when changes are pushed to the master branch. This workflow will also re-generate API documentation (JavaDoc and KDoc) and publish it to GitHub pages (using the docs branch).

Publish

The Publish workflow is responsible for creating a release artifact and uploading it to the project releases. This workflow will only be run when a new tag is pushed.

Publication

The publish Gradle task is configured to publish the project artifacts to the Maven central repository. Currently this is not included as part of any of the automated workflows (i.e. it should be done manually).

The publishing process requires a key pair to be provided for generating OpenPGP signatures. The details of the keys are provided in the following environment variables:

  • ORG_GRADLE_PROJECT_signingKeyId: Public key ID
  • ORG_GRADLE_PROJECT_signingKey: Private key (in ascii-armored format)
  • ORG_GRADLE_PROJECT_signingPassword: Passphrase associated with the private key

Note that signing will only be performed when these three environment variables are set.

To publish the artifact, credentials for Sonatype need to be set in the following environment variables:

  • SONATYPE_USERNAME
  • SONATYPE_PASSWORD

Clone this wiki locally