Skip to content

Commit 3fd2da9

Browse files
github-actions[bot]gradle-update-robotFlorianMichael
authored
Update Gradle Wrapper from 8.10.2 to 8.11 (#549)
* Update Gradle Wrapper from 8.10.2 to 8.11 Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc> * Update Gradle API usage --------- Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc> Co-authored-by: gradle-update-robot <gradle-update-robot@regolo.cc> Co-authored-by: FlorianMichael <florian.michael07@gmail.com>
1 parent ff4fbe2 commit 3fd2da9

File tree

3 files changed

+18
-27
lines changed

3 files changed

+18
-27
lines changed

build.gradle

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,41 +52,32 @@ idea {
5252
// -----------------------------------------------------
5353
// Publishing
5454

55-
def latestCommitHash() {
56-
def byteOut = new ByteArrayOutputStream()
57-
exec {
58-
commandLine 'git', 'rev-parse', '--short', 'HEAD'
59-
standardOutput = byteOut
60-
}
61-
return byteOut.toString('UTF-8').trim()
55+
Provider<String> latestCommitHash() {
56+
return providers.exec {
57+
commandLine = ["git", "rev-parse", "--short", "HEAD"]
58+
}.standardOutput.getAsText().map(String::trim)
6259
}
6360

64-
def latestCommitMessage() {
65-
def byteOut = new ByteArrayOutputStream()
66-
exec {
67-
commandLine 'git', 'log', '-1', '--pretty=%B'
68-
standardOutput = byteOut
69-
}
70-
return byteOut.toString('UTF-8').trim()
61+
Provider<String> latestCommitMessage() {
62+
return providers.exec {
63+
commandLine = ["git", "log", "-1", "--pretty=%B"]
64+
}.standardOutput.getAsText().map(String::trim)
7165
}
7266

73-
def branchName() {
74-
def byteOut = new ByteArrayOutputStream()
75-
exec {
76-
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
77-
standardOutput = byteOut
78-
}
79-
return byteOut.toString('UTF-8').trim()
67+
Provider<String> branchName() {
68+
return providers.exec {
69+
commandLine = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
70+
}.standardOutput.getAsText().map(String::trim)
8071
}
8172

82-
def branch = branchName()
73+
def branch = branchName().get()
8374
def baseVersion = project.maven_version
8475
def isRelease = !baseVersion.contains('-')
8576
def isMainBranch = branch == "master"
8677
if (!isRelease || isMainBranch) { // Only publish releases from the main branch
8778
def suffixedVersion = isRelease ? baseVersion : baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
88-
def commitHash = latestCommitHash()
89-
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaRewind/commit/${commitHash}) ${latestCommitMessage()}"
79+
def commitHash = latestCommitHash().get()
80+
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaRewind/commit/${commitHash}) ${latestCommitMessage().get()}"
9081
modrinth {
9182
def mcVersions = project.mcVersions
9283
.split(',')

common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sourceSets {
1313
main {
1414
classTokenReplacer {
1515
property("\${version}", rootProject.maven_version)
16-
property("\${impl_version}", "git-ViaRewind-${rootProject.maven_version}:${rootProject.latestCommitHash()}")
16+
property("\${impl_version}", "git-ViaRewind-${rootProject.maven_version}:${rootProject.latestCommitHash().get()}")
1717
}
1818
}
1919
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)