@@ -2,7 +2,7 @@ plugins {
22 id ' net.neoforged.moddev' version ' 2.0.141'
33 id ' net.darkhax.curseforgegradle' version ' 1.1.28'
44 id ' com.github.kt3k.coveralls' version ' 2.12.0'
5- id ' com.diffplug.spotless' version ' 6.25.0 '
5+ id ' com.diffplug.spotless' version ' 7.2.1 '
66 id ' com.gradleup.shadow' version ' 8.3.8'
77 id ' com.modrinth.minotaur' version ' 2.+'
88}
@@ -70,9 +70,13 @@ def getChangelog() {
7070 if (System . getenv(). RELEASE ) {
7171 return file(" ./CHANGELOG-${ project.minecraft_version} .md" ). getText();
7272 } else {
73- // Check if any release tag exists for this Minecraft version
74- def proc = [' git' , ' tag' , ' --list' , " ${ project.minecraft_version} -*" ]. execute([], project. rootProject. projectDir)
75- def tags = proc. text. trim()
73+ // Check if any release tag exists for this Minecraft version.
74+ // Uses providers.exec so the process is not started during configuration,
75+ // which would be incompatible with the configuration cache.
76+ def tags = providers. exec {
77+ workingDir = project. rootProject. projectDir
78+ commandLine ' git' , ' tag' , ' --list' , " ${ project.minecraft_version} -*"
79+ }. standardOutput. asText. get(). trim()
7680 if (tags) {
7781 return " Changes since last release: ${ project.github_url} /compare/${ project.minecraft_version} -${ project.mod_version} ...${ System.getenv().GITHUB_SHA} "
7882 } else {
@@ -380,7 +384,7 @@ spotless {
380384 endWithNewline()
381385 trimTrailingWhitespace()
382386 removeUnusedImports()
383- indentWithSpaces ()
387+ leadingTabsToSpaces ()
384388 }
385389}
386390
0 commit comments