diff --git a/build.gradle b/build.gradle index 358276e6..0df67a03 100644 --- a/build.gradle +++ b/build.gradle @@ -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 + "^"