Gradle Git Changelog plugin

Generate Git changelogs for Gradle projects

License

License

Categories

Categories

Gradle Build Tools Git Development Tools Version Controls
GroupId

GroupId

com.selesse
ArtifactId

ArtifactId

gradle-git-changelog
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Gradle Git Changelog plugin
Generate Git changelogs for Gradle projects
Project URL

Project URL

https://github.com/selesse/gradle-git-changelog
Source Code Management

Source Code Management

https://github.com/selesse/gradle-git-changelog

Download gradle-git-changelog

How to add to project

<!-- https://jarcasting.com/artifacts/com.selesse/gradle-git-changelog/ -->
<dependency>
    <groupId>com.selesse</groupId>
    <artifactId>gradle-git-changelog</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.selesse/gradle-git-changelog/
implementation 'com.selesse:gradle-git-changelog:0.3.0'
// https://jarcasting.com/artifacts/com.selesse/gradle-git-changelog/
implementation ("com.selesse:gradle-git-changelog:0.3.0")
'com.selesse:gradle-git-changelog:jar:0.3.0'
<dependency org="com.selesse" name="gradle-git-changelog" rev="0.3.0">
  <artifact name="gradle-git-changelog" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.selesse', module='gradle-git-changelog', version='0.3.0')
)
libraryDependencies += "com.selesse" % "gradle-git-changelog" % "0.3.0"
[com.selesse/gradle-git-changelog "0.3.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.guava : guava jar 18.0

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.spockframework : spock-core jar 1.0-groovy-2.4
org.assertj : assertj-core jar 1.7.1
commons-io : commons-io jar 2.5

Project Modules

There are no modules declared in this project.

Gradle Git Changelog

Build status

Gradle plugin for generating a changelog based on a Git commit history.

See recent changes.

Note: This plugin should not be considered stable until 1.0.

Usage

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.selesse:gradle-git-changelog:0.2.+'
    }
}

apply plugin: 'com.selesse.git.changelog'

Build script snippet for new, incubating, plugin mechanism introduced in Gradle 2.1 for gradle-git-changelog:

plugins {
    id 'com.selesse.git.changelog' version '0.2.+'
}

This will automatically hook the generateChangelog task into the processResources or assemble task of the project.

Configuration

All of these configurations are optional.

changelog {
    // The title appears at the top of the changelog.
    // Default value: the name of the project.
    title = "${project.name} - Changelog"

    // The output directory where the report is generated.
    // Default value: main resource directory, or the "build" directory
    outputDirectory = file("$projectDir")

    // The name of the report to generate.
    // Default value: CHANGELOG.md
    fileName = "changelog.txt"

    // The range of commits the changelog should be composed of.
    // Default value: 'beginning' (i.e. full changelog)
    // Possible values: 'beginning', 'last_tag', 'xxx'
    //
    // 'last_tag' will use all the commits since the last tag,
    // 'beginning' will use all commits since the initial commit (default)
    // 'xxx' will use all the tags since the 'xxx' Git reference (i.e. `since = 1.2.0` will display the changelog
    //       since the 1.2.0 tag, excluding 1.2.0)
    since = 'last_tag'

    // The output formats that should be generated.
    // Default value: ['markdown']
    // Possible values: 'html', 'markdown'.
    formats = ['html', 'markdown']


    // The Git "pretty" changelog commit format.
    // Default value: %ad%x09%s (%an), which produces:
    // Thu May 7 20:10:33 2015 -0400	Initial commit (Alex Selesse)
    commitFormat = '%s (%an)'

    // Specifies a commit format for Markdown.
    // Default value: '* %s (%an)', which produces:
    // * Initial commit (Alex Selesse)
    markdown {
        commitFormat = '* %s (%an)'
    }

    // Specifies a commit format for the HTML template.
    // Default value: see commitFormat
    html {
        commitFormat = '%s (%an)'

        // The Groovy HTML template used to generate the HTML changelog.
        // See http://docs.groovy-lang.org/latest/html/documentation/template-engines.html
        template = file("$projectDir/htmlTemplate").text
    }

    // A closure that returns 'true' if the line should be included in the changelog.
    // Default value: accept everything, { true }
    includeLines = {
        !it.contains("Merge")
    }

    // A closure that transforms a changelog String.
    // Default value: the identity closure, { it }
    //
    // For example, to remove '[ci skip]' from the changelog messages:
    processLines = {
        String input = it as String
        if (input.contains('[ci skip] ')) {
            input = input.minus('[ci skip] ')
        }
        input
    }
}

Versions

Version
0.3.0
0.2.1
0.2.0
0.1.2
0.1.1
0.1.0