Skip to content

Commit f172ae9

Browse files
authored
build(gradle): Update to Gradle v9.4.1 (#209)
1 parent 2395f14 commit f172ae9

6 files changed

Lines changed: 14 additions & 31 deletions

File tree

build.gradle.kts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ import java.nio.charset.Charset
3030
plugins {
3131
id("java")
3232
id("maven-publish")
33-
id("com.gradleup.shadow") version "8.3.5"
34-
id("io.papermc.hangar-publish-plugin") version "0.1.2"
35-
id("com.modrinth.minotaur") version "2.8.7"
36-
id("xyz.jpenilla.run-paper") version "2.3.1"
33+
id("com.gradleup.shadow") version "9.4.1"
34+
id("io.papermc.hangar-publish-plugin") version "0.1.4"
35+
id("com.modrinth.minotaur") version "2.9.0"
36+
id("xyz.jpenilla.run-paper") version "3.0.2"
3737
id("io.github.apdevteam.github-packages") version "1.2.2"
38+
id("org.ajoberstar.grgit") version ("5.3.3")
3839
}
3940

4041
group = "com.dre.brewery"
@@ -147,7 +148,7 @@ tasks {
147148
outputs.upToDateWhen { false }
148149
filter<ReplaceTokens>(
149150
mapOf(
150-
"tokens" to mapOf("version" to "${project.version};${getGitBranch()}"),
151+
"tokens" to mapOf("version" to "${project.version};${grgit.branch.current().name}"),
151152
"beginToken" to "\${",
152153
"endToken" to "}"
153154
)
@@ -291,19 +292,6 @@ hangarPublish {
291292
}
292293
}
293294

294-
295-
296-
fun getGitBranch(): String = ByteArrayOutputStream().use { stream ->
297-
var branch = "none"
298-
// TODO: can some nice person replace this deprecated method please? :)
299-
project.exec {
300-
commandLine = listOf("git", "rev-parse", "--abbrev-ref", "HEAD")
301-
standardOutput = stream
302-
}
303-
if (stream.size() > 0) branch = stream.toString(Charset.defaultCharset().name()).trim()
304-
return branch
305-
}
306-
307295
fun readChangeLog(): String {
308296
val text: String = System.getenv("CHANGELOG") ?: file("CHANGELOG.md").run {
309297
if (exists()) readText() else "No Changelog found."

gradle/wrapper/gradle-wrapper.jar

5.26 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ rootProject.name = "BreweryX"
22

33
plugins {
44
// add toolchain resolver
5-
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
5+
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
66
}

0 commit comments

Comments
 (0)