Add git version

This commit is contained in:
Len 2022-10-19 18:10:54 +02:00
parent b7c6b903e0
commit e52733f74f

View File

@ -3,6 +3,7 @@ import java.io.ByteArrayOutputStream
plugins { plugins {
`maven-publish` `maven-publish`
id("com.github.johnrengelman.shadow") id("com.github.johnrengelman.shadow")
id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
id("xyz.jpenilla.run-paper") version "1.0.6" id("xyz.jpenilla.run-paper") version "1.0.6"
} }
@ -23,6 +24,14 @@ tasks {
} }
bukkit {
name = project.name
main = "$group.${project.name}"
version = gitCommit()
apiVersion = "1.19"
authors = listOf("Teriuihi")
}
fun gitCommit(): String { fun gitCommit(): String {
val os = ByteArrayOutputStream() val os = ByteArrayOutputStream()
project.exec { project.exec {