From cc75654b057276c3b9ec8e48be238983a152c579 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 19 Apr 2021 12:56:34 +0200 Subject: [PATCH] Do not append commit when building locally Because the commit is the version when building locally. --- buildSrc/src/main/kotlin/PlatformConfig.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/PlatformConfig.kt b/buildSrc/src/main/kotlin/PlatformConfig.kt index 7cdf24dc2..fbec8befd 100644 --- a/buildSrc/src/main/kotlin/PlatformConfig.kt +++ b/buildSrc/src/main/kotlin/PlatformConfig.kt @@ -25,8 +25,12 @@ fun Project.applyPlatformAndCoreConfiguration() { // apply(plugin = "checkstyle") apply(plugin = "com.github.johnrengelman.shadow") - ext["internalVersion"] = "$version;${rootProject.ext["gitCommitHash"]}" - + if (project.hasProperty("buildnumber")) { + ext["internalVersion"] = "$version;${rootProject.ext["gitCommitHash"]}" + } else { + ext["internalVersion"] = "$version" + } + tasks .withType() .matching { it.name == "compileJava" || it.name == "compileTestJava" }