mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-23 00:49:27 +00:00
chore: update gradle (8.12) and improve version handling
This commit is contained in:
@@ -11,7 +11,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "me.lojosho"
|
group = "me.lojosho"
|
||||||
version = "0.5.2-${getGitCommitHash()}"
|
version = "0.5.2${getGitCommitHash()}"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
@@ -74,8 +74,8 @@ allprojects {
|
|||||||
|
|
||||||
// Included externally
|
// Included externally
|
||||||
compileOnly("com.mojang:authlib:1.5.25")
|
compileOnly("com.mojang:authlib:1.5.25")
|
||||||
compileOnly("org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT")
|
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
|
||||||
compileOnly("org.jetbrains:annotations:24.1.0")
|
compileOnly("org.jetbrains:annotations:26.0.1")
|
||||||
compileOnly("io.th0rgal:oraxen:1.182.0")
|
compileOnly("io.th0rgal:oraxen:1.182.0")
|
||||||
compileOnly("com.nexomc:nexo:0.1.0-dev.0")
|
compileOnly("com.nexomc:nexo:0.1.0-dev.0")
|
||||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14")
|
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14")
|
||||||
@@ -307,13 +307,21 @@ class PublishData(private val project: Project) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getGitCommitHash(): String {
|
fun getGitCommitHash(): String {
|
||||||
|
var includeHash = true
|
||||||
|
val includeHashVariable = System.getenv("HMCC_INCLUDE_HASH")
|
||||||
|
|
||||||
|
if (!includeHashVariable.isNullOrEmpty()) includeHash = includeHashVariable.toBoolean()
|
||||||
|
|
||||||
|
if (includeHash) {
|
||||||
return try {
|
return try {
|
||||||
val process = ProcessBuilder("git", "rev-parse", "--short", "HEAD")
|
val process = ProcessBuilder("git", "rev-parse", "--short", "HEAD")
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.start()
|
.start()
|
||||||
|
|
||||||
process.inputStream.bufferedReader().use { it.readLine().trim() }
|
process.inputStream.bufferedReader().use { "-" + it.readLine().trim() }
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
"unknown" // Fallback if Git is not available or an error occurs
|
"-unknown" // Fallback if Git is not available or an error occurs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user