Skip to content

hndrs/gradle-publishing-info-plugin

Repository files navigation

Maven metadata URL Coverage Supported Java Version Sponsor

Gradle Publishing Info

This is a small helper plugin to add meta information to maven publications.

Using the Plugin

Add the following dependency to your plugin block in your rootProject

plugins {
    id("io.hndrs.publishing-info").version("3.1.0")
}

The Plugin automatically registers a publishingInfo extension on all projects

Configuring the RootProject

publishingInfo {
    name = "Root Project"
    description = "Sample RootProject Description"
    inceptionYear = "2021"
    url = "https://github.com/hndrs/gradle-publishing-info-plugin"
    license = License(
        "https://github.com/hndrs/gradle-publishing-info-plugin/blob/main/LICENSE",
        "MIT License"
    )
    developers = listOf(
        Developer("maintainerid", "Maintainers Name", "maintainer@email.com")
    )
    contributers = listOf(
        Contributor("Contributer Name", "contributers email")
    )
    organization = Organization("Your Org", "https://yourdomain.com")
    scm = Scm(
        "scm:git:git://github.com/hndrs/gradle-publishing-info-plugin",
        "https://github.com/hndrs/gradle-publishing-info-plugin"
    )
}

RootProject gradle file (build.gradle.kts)

Configuring SubProjects

publishingInfo {
    // applies all values from rootProject publishingInfo block
    applyFromRoot = true
    // overrides name
    name = "Sub Project"
    // overrides description
    description = "Sample SubProject Description"
}