No output file using gradle plugin version 1.71.4
svengre-transrail opened this issue · 5 comments
Hello. I am running
plugins {
id 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' version '1.71.4'
}
In my build.gradle file with task:
task generateChangeLog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
file = new File("CHANGELOG.md");
templateContent = file('changelog.mustache').getText('UTF-8');
}
Nothing fancy. For some reason the output file is nowhere to be seen when I run the task. The file appears when I use version 1.66 but that version does not seem to support the conventional commits Changlog template found at https://github.com/tomasbjerre/git-changelog-lib#Helpers.
Sorry for little to no information. Using gradle version 2.3 through intelliJ IDEA 2021.2 (Community Edition). Appreciate any help
Perhaps the very old Gradle version. Or something wrong in the template. Have a look at the examples and try to find the issue:
https://github.com/tomasbjerre/git-changelog-gradle-plugin/blob/master/git-changelog-gradle-plugin-example/build.gradle
The file fails to appear no matter what is in the template for 1.71.4.
i.e.
templateContent = """
#Hello World
"""
produces a markdown file with #Hello World and nothing else. 1.71.4 produces nothing.
Thank you for your response
Hi,
I just tried 1.71.8
and got the same behavior, but in fact, the file is well generated, but under the .gradle/daemon/7.3.3
in my case. I've just adapted the task config like this:
task generateGitChangelogTemplateFromFile(type: GitChangelogTask) {
fromRepo = file(".");
file = new File("${projectDir}/CHANGELOG.md");
templateContent = file('changelog.mustache').getText('UTF-8');
}
And I get the file generated under my project without issue.
This also works instead of using new File()
task generateChangelog(type: GitChangelogTask) {
fromRepo = file(".");
prependToFile = false;
file = file("CHANGELOG.md")
templateContent = file('changelog.mustache').getText('UTF-8');
}
The plugin should now default to CHANGELOG.md
in the root dir: