Skip to content

Gradle

TechSheet provides a Gradle plugin that can generate YAML and JSON reports, based on the gradle configuration and dependencies.

Alpha Version

The project is currently under heavy development and still in alpha version. Therefore, it has not been published to the Gradle Plugin Portal.

Installation

The plugin is distributed using the Gradle Plugin Portal. Just add it to the plugins section of our Gradle configuration:

// build.gradle.kts
plugins {
    id("org.techsheet.gradle-plugin") version "1.0.6"
}
// build.gradle
plugins {
    id 'org.techsheet.gradle-plugin' version '1.0.6'
}

Usage

The plugin registers a task called commondepsReport. Execute it using Gradle to create the report:

./gradlew commondepsReport

To ghet a description and all possible options of the task, run:

./gradlew help --task commondepsReport

Configuration

The plugin comes with stable default configurations. Custom configuration will rarely be needed.

If you want to customize behavior however, the gradle task has config values which can be overridden in the Gradle config file:

// build.gradle.kts
import org.techsheet.plugins.gradle.task.CommondepsReportTask

// ...

tasks.withType<CommondepsReportTask> {
    format = CommondepsReportTask.Format.JSON
    fileName = "custom-name.json"
}
// build.gradle.kts
import org.techsheet.plugins.gradle.task.CommondepsReportTask

// ...

tasks.withType(CommondepsReportTask) {
    format = CommondepsReportTask.Format.JSON
    fileName = "custom-name.json"
}

The following configuration options are available:

Name Default Value Description
format CommondepsReportTask.Format.YAML Specified in which format the report should be generated
fileName techsheet.yaml The filename of the report. If you change format to JSON, make sure to update the filename as well.