WorldGuard/build.gradle.kts

18 lines
412 B
Plaintext
Raw Normal View History

2019-07-30 05:25:13 +02:00
import org.ajoberstar.grgit.Grgit
2024-07-02 14:47:57 +02:00
plugins {
id("buildlogic.common")
id("buildlogic.artifactory-root")
}
2019-07-30 05:25:13 +02:00
if (!project.hasProperty("gitCommitHash")) {
apply(plugin = "org.ajoberstar.grgit")
ext["gitCommitHash"] = try {
2024-07-02 14:47:57 +02:00
extensions.getByName<Grgit>("grgit").head()?.abbreviatedId
2019-07-30 05:25:13 +02:00
} catch (e: Exception) {
logger.warn("Error getting commit hash", e)
2020-07-03 01:09:09 +02:00
"no.git.id"
2019-07-30 05:25:13 +02:00
}
2024-07-02 14:47:57 +02:00
}