https://github.com/tomtom-international/updatechangelog-gradle-plugin
Gradle plugin for automating Changelog update process.
https://github.com/tomtom-international/updatechangelog-gradle-plugin
changelog gradle-plugin release update
Last synced: 2 months ago
JSON representation
Gradle plugin for automating Changelog update process.
- Host: GitHub
- URL: https://github.com/tomtom-international/updatechangelog-gradle-plugin
- Owner: tomtom-international
- License: apache-2.0
- Created: 2018-10-24T10:51:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T08:25:23.000Z (about 4 years ago)
- Last Synced: 2025-01-28T16:14:43.017Z (4 months ago)
- Topics: changelog, gradle-plugin, release, update
- Language: Groovy
- Size: 188 KB
- Stars: 3
- Watchers: 10
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# updatechangelog-gradle-plugin
Gradle plugin for automating the changelog update process.
This plugin creates a task *updateChangelog* that can be hooked for example into the
[Gradle release plugin](https://github.com/researchgate/gradle-release) and update a
changelog file based on the released version and the release date.## How to use it
1. Create a changelog file
```bash
echo "# Changelog" > CHANGELOG.md
```1. Add a new bullet point below the header:
```markdown
# Changelog
* Initial commit
```1. Add the Gradle plugin
1. Using the [plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):
In *build.gradle.kts*
```kotlin
plugins {
id("com.tomtom.gradle.updatechangelog") version ""
}
```In *build.gradle*
```groovy
plugins {
id "com.tomtom.gradle.updatechangelog" version ""
}
```1. Configure it in *build.gradle*
```groovy
changelog {
versionPlaceholder = '# Changelog'
changelogFilename = 'CHANGELOG.md'
}
```1. Run the *updateChangelog* task
This step is just needed to validate that the update task is working as expected. Once you run
it you should revert the changes it did in your changelog file.```bash
./gradlew updateChangelog
```
This command will update the *CHANGELOG.md* file with the version provided by the project version
property and the current date.```markdown
# Changelog**1.0.0** (2018-10-23):
* Initial commit
```1. In most cases you will hook this plugin under the Gradle release plugin so that the changelog
gets updated whenever a new release is done.```gradle
preTagCommit.dependsOn updateChangelog
```## How to compile and run tests
Run a clean build:
```bash
./gradlew clean build
```This command will clean your workspace, build the code and tests and run the unit and functional tests.
To run only tests use the following command:
```bash
./gradlew check
```