Skip to content

MelonRice/git-changelog-gradle-plugin

 
 

Repository files navigation

Git Changelog Gradle Plugin

Build Status Maven Central Bintray

This is a Gradle plugin for Git Changelog Lib.

Usage

There is a complete running example here.

There are some more examples in the build.gradle.

Here is and example that will produce a CHANGELOG.md when running ./gradlew gitChangelogTask.

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:X"
  }
}

apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"

task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
 file = new File("CHANGELOG.md");
Changelog of ${projectDisplayName}.

{{#tags}}
## {{name}}
 {{#issues}}
  {{#hasIssue}}
   {{#hasLink}}
### {{name}} [{{issue}}]({{link}}) {{title}} {{#hasIssueType}} *{{issueType}}* {{/hasIssueType}} {{#hasLabels}} {{#labels}} *{{.}}* {{/labels}} {{/hasLabels}}
   {{/hasLink}}
   {{^hasLink}}
### {{name}} {{issue}} {{title}} {{#hasIssueType}} *{{issueType}}* {{/hasIssueType}} {{#hasLabels}} {{#labels}} *{{.}}* {{/labels}} {{/hasLabels}}
   {{/hasLink}}
  {{/hasIssue}}
  {{^hasIssue}}
### {{name}}
  {{/hasIssue}}

  {{#commits}}
**{{{messageTitle}}}**

{{#messageBodyItems}}
 * {{.}}
{{/messageBodyItems}}

[{{hash}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}} *{{commitTime}}*

  {{/commits}}

 {{/issues}}
{{/tags}}
 """;
}

More documentation can be found in the Git Changelog Lib.

About

Gradle plugin that generates a changelog or releasenotes from git repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.6%
  • HTML 4.7%
  • Shell 2.7%