Minor buildscript improvements

This commit is contained in:
embeddedt 2023-08-09 12:41:49 -04:00
parent 7b23053da0
commit f488df2d45
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -146,7 +146,7 @@ configure(subprojects.findAll {it.name == "common" || it.name == "forge" || it.n
}
}
tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
@ -164,10 +164,10 @@ tasks.withType(JavaCompile) {
*/
}
task generateChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
tasks.register('generateChangelog', se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
def details = versionDetails();
def theVersionRef
if(details.commitDistance > 0) {
if (details.commitDistance > 0) {
theVersionRef = details.lastTag;
} else {
def secondLastTagCmd = "git describe --abbrev=0 " + details.lastTag + "^"