Gradle

Plugins

  1. Axion plugin

    We are using Gradle's axion-release plugin for release & version management.

    If current commit is tagged commit, project has a release version( i.e., 0.1.0). If there were any commits after last tag, project is in SNAPSHOT version( i.e., 0.1.1-SNAPSHOT).

    axion-release follows the structure of git, only knows about tags on given branch.

Usage

first time generating a new library project

gradle init --type kotlin-library --dsl kotlin
Options for all gradle commands: -D or --system-prop, -P or --project-prop, -m or --dry-run

Check Task Dependencies With a Dry Run with dryRun: -m or --dry-run i.e., gradle publish -m

Version

display computed version

gradle cV
gradle currentVersion
# to get version # as plain text
export VERSION=$(gradle cV -q -Prelease.quiet)
echo $VERSION

Verification

dependency-check

Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project’s dependencies.

kover

Kover is Code Coverage plugin for Kotlin

Note: Cross-module tests are not supported in reports and validation yet. For each test, only the classpath belonging to the current module is taken.

Spotless tasks

Quarkus tasks

Docker Compose

start/stop dependent services for your app

Affected Module Detector (AMD)

The detector allows for three options for affected modules:

  • Changed Projects: These are projects which had files changed within them – enabled with -Paffected_module_detector.changedProjects)

  • Dependent Projects: These are projects which are dependent on projects which had changes within them enabled with -Paffected_module_detector.dependentProjects)

  • All Affected Projects: This is the union of Changed Projects and Dependent Projects (this is the default configuration)

Build

build jar

Run

Docs

https://github.com/Kotlin/dokka/blob/master/docs/src/doc/docs/user_guide/gradle/usage.md

Release

bump git Tag and Push

Changelog

With every release, run git-chglog

Publish

publish after release

Docker

local testing

pull a remote image and locally use it as base image

Dependencies

This use versions plugin and version-catalog-update-plugin

Gradle

Maven

Remove a local built dependency from local-maven-repository

FAQ

Reference

Last updated

Was this helpful?