Skip to content
Jake Gage edited this page Oct 3, 2020 · 2 revisions

Manifesto plugin

Release Build Status

A plugin for the Gradle build system that sets manifest data for JAr and WAr artifacts inferred from a project's Git status.

News

I added the hacktoberfest Topic to our GitHub Repository. Consider this a challenge for someone go forth and upgrade one of the builders to the newest version of Gradle. 😉

Usage

Applying the plugin

Include either of the following in your build script:

Gradle 2.1+

plugins {
    id 'com.github.dispader.manifesto' version '0.4.0'
}

Gradle 1.x/2.0

buildscript {
    repositories.jcenter()
    dependencies {
        classpath 'com.github.dispader:manifesto:0.4.0'
    }
}
apply plugin: 'com.github.dispader.manifesto'

Prerequisites

The plugin only affects configurations for the java and/or war plugins, and only produces meaningful results for Git projects.

Configuration

default configuration

If the conventional project.group is defined (for the top-level project), this value will be used to set the Implementation-Vendor-Id.

extension configuration

Some elements of manifests which cannot be determined from the Git project status or the default project configuration can be set via the plugin's configuration object.

  • vendor sets Specification-Vendor and Implementation-Vendor
  • vendor_id sets Implementation-Vendor-Id (and overrides project.group default)
  • url sets Implementation-URL
manifesto {
    vendor = 'Jake Gage'
    vendor_id = 'com.github.dispader'
    url = 'https://github.com/Dispader/manifesto'
}

Behavior

  • Manifest-Version is set to 1.0
  • Specification-Title and Implementation-Title are set to the Gradle rootProject.name
  • Specification-Version and Implementation-Version are set based on Git commit status (see git describe)
    • IFF no version can be determined via a git describe, and a Gradle rootProject.version can be, this value will be used instead
  • Implementation-Timestamp is set to the build time

Analytics