WorldGuard/build.gradle.kts

26 lines
752 B
Plaintext
Raw Permalink Normal View History

2019-07-30 05:25:13 +02:00
import org.ajoberstar.grgit.Grgit
logger.lifecycle("""
*******************************************
You are building WorldGuard!
If you encounter trouble:
1) Try running 'build' in a separate Gradle run
2) Use gradlew and not gradle
3) If you still need help, ask on Discord! https://discord.gg/enginehub
Output files will be in [subproject]/build/libs
*******************************************
""")
applyRootArtifactoryConfig()
if (!project.hasProperty("gitCommitHash")) {
apply(plugin = "org.ajoberstar.grgit")
ext["gitCommitHash"] = try {
2021-06-11 17:52:43 +02:00
Grgit.open(mapOf("currentDir" to project.rootDir))?.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
}
}