mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-19 20:51:22 +01:00
Updated gradle to 8.11
This commit is contained in:
parent
3fd2b61798
commit
1f164f447a
39
build.gradle
39
build.gradle
@ -57,40 +57,31 @@ idea {
|
|||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// Publishing
|
// Publishing
|
||||||
|
|
||||||
def latestCommitHash() {
|
Provider<String> latestCommitHash() {
|
||||||
def byteOut = new ByteArrayOutputStream()
|
return providers.exec {
|
||||||
exec {
|
commandLine = ["git", "rev-parse", "--short", "HEAD"]
|
||||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
}.standardOutput.getAsText().map(String::trim)
|
||||||
standardOutput = byteOut
|
|
||||||
}
|
|
||||||
return byteOut.toString('UTF-8').trim()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def latestCommitMessage() {
|
Provider<String> latestCommitMessage() {
|
||||||
def byteOut = new ByteArrayOutputStream()
|
return providers.exec {
|
||||||
exec {
|
commandLine = ["git", "log", "-1", "--pretty=%B"]
|
||||||
commandLine 'git', 'log', '-1', '--pretty=%B'
|
}.standardOutput.getAsText().map(String::trim)
|
||||||
standardOutput = byteOut
|
|
||||||
}
|
|
||||||
return byteOut.toString('UTF-8').trim()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def branchName() {
|
Provider<String> branchName() {
|
||||||
def byteOut = new ByteArrayOutputStream()
|
return providers.exec {
|
||||||
exec {
|
commandLine = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
|
||||||
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
|
}.standardOutput.getAsText().map(String::trim)
|
||||||
standardOutput = byteOut
|
|
||||||
}
|
|
||||||
return byteOut.toString('UTF-8').trim()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def branch = branchName()
|
def branch = branchName().get()
|
||||||
def baseVersion = project.maven_version
|
def baseVersion = project.maven_version
|
||||||
def isRelease = !baseVersion.contains('-')
|
def isRelease = !baseVersion.contains('-')
|
||||||
if (!isRelease) { // Only publish releases from the main branch
|
if (!isRelease) { // Only publish releases from the main branch
|
||||||
def suffixedVersion = isRelease ? baseVersion : baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
|
def suffixedVersion = isRelease ? baseVersion : baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
|
||||||
def commitHash = latestCommitHash()
|
def commitHash = latestCommitHash().get()
|
||||||
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaAprilFools/commit/${commitHash}) ${latestCommitMessage()}"
|
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaAprilFools/commit/${commitHash}) ${latestCommitMessage().get()}"
|
||||||
modrinth {
|
modrinth {
|
||||||
def mcVersions = project.mcVersions
|
def mcVersions = project.mcVersions
|
||||||
.split(',')
|
.split(',')
|
||||||
|
@ -13,7 +13,7 @@ sourceSets {
|
|||||||
main {
|
main {
|
||||||
classTokenReplacer {
|
classTokenReplacer {
|
||||||
property("\${version}", project.version)
|
property("\${version}", project.version)
|
||||||
property("\${impl_version}", "git-ViaAprilFools-${project.version}:${rootProject.latestCommitHash()}")
|
property("\${impl_version}", "git-ViaAprilFools-${project.version}:${rootProject.latestCommitHash().get()}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
Loading…
Reference in New Issue
Block a user