diff --git a/build.gradle.kts b/build.gradle.kts index 0a8bb22..9fd9dba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import java.io.ByteArrayOutputStream - plugins { id("java") id("com.github.johnrengelman.shadow") version "7.1.0" @@ -48,13 +46,3 @@ publishing { dependencies { compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT") } - -fun gitCommit(): String { - val os = ByteArrayOutputStream() - project.exec { - isIgnoreExitValue = true - commandLine = "git rev-parse --short HEAD".split(" ") - standardOutput = os - } - return String(os.toByteArray()).trim() -} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 28551f1..ace10e6 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -1,3 +1,5 @@ +import java.io.ByteArrayOutputStream + plugins { `maven-publish` id("com.github.johnrengelman.shadow") @@ -12,7 +14,7 @@ dependencies { tasks { shadowJar { - archiveFileName.set("${rootProject.name}-${project.version}.jar") + archiveFileName.set("${rootProject.name}.jar") } build { @@ -20,3 +22,13 @@ tasks { } } + +fun gitCommit(): String { + val os = ByteArrayOutputStream() + project.exec { + isIgnoreExitValue = true + commandLine = "git rev-parse --short HEAD".split(" ") + standardOutput = os + } + return String(os.toByteArray()).trim() +}