Skip to content
Gradle plugin for generating a changelog based on a Git commit history
Groovy Java Shell Smarty
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildscript buildscript -> .buildscript May 17, 2015
bin Fix release order and not pushing tags Dec 1, 2016
src Properly specify task inputs and outputs Dec 1, 2016
.gitignore Initial commit May 8, 2015
.travis.yml Move to Java 7 Nov 30, 2016 Prepare version 0.4.0-SNAPSHOT Dec 1, 2016
LICENSE Initial commit May 10, 2015 Update README to be semantic versioning friendly Aug 16, 2016
gradlew Bump to Gradle 3.2 Nov 30, 2016
gradlew.bat Bump to Gradle 3.2 Nov 30, 2016
settings.gradle Fix group/JAR pattern May 8, 2015

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.


buildscript {
    repositories {
    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.


All of these configurations are optional.

changelog {
    // The title appears at the top of the changelog.
    // Default value: the name of the project.
    title = "${} - 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:
    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
        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 = {

    // 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] ')
You can’t perform that action at this time.