clean up bulid file name

This commit is contained in:
Aria Moradi
2021-01-22 01:37:24 +03:30
parent 1a23804e51
commit eac7436b18
4 changed files with 28 additions and 17 deletions

View File

@@ -1,4 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.io.BufferedReader
plugins {
// id("org.jetbrains.kotlin.jvm") version "1.4.21"
@@ -6,6 +7,8 @@ plugins {
id("com.github.johnrengelman.shadow") version "6.1.0"
}
val TachideskVersion = "v0.0.1"
repositories {
mavenCentral()
@@ -102,6 +105,19 @@ sourceSets {
}
}
val TachideskRevision = Runtime
.getRuntime()
.exec("git rev-list master --count")
.let { process ->
process.waitFor()
val output = process.inputStream.use {
it.bufferedReader().use(BufferedReader::readText)
}
process.destroy()
"r"+output.trim()
}
tasks {
jar {
manifest {
@@ -115,12 +131,14 @@ tasks {
}
shadowJar {
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
archiveBaseName.set("Tachidesk")
archiveVersion.set(TachideskVersion)
archiveClassifier.set(TachideskRevision)
}
}
tasks.withType<ShadowJar> {
destinationDir = File("$rootDir/server/build")
//dependsOn(":webUI:copyBuild")
}
tasks.named("processResources") {