-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
32 lines (28 loc) · 958 Bytes
/
Copy pathbuild.gradle.kts
File metadata and controls
32 lines (28 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
plugins {
`java-base`
kotlin("jvm") version "2.3.0" apply false
id("com.gradleup.shadow") version "9.4.2" apply false
id("com.github.gmazzo.buildconfig") version "6.0.10" apply false
}
group = "io.wdsj"
val pluginVersion = providers.gradleProperty("pluginVersion").get()
val versionChannel = providers.gradleProperty("versionChannel").get()
version = pluginVersion
fun git(vararg args: String): String {
return try {
providers.exec {
commandLine("git", *args)
isIgnoreExitValue = true
}.standardOutput.asText.get().trim().ifBlank { "unknown" }
} catch (_: Exception) {
"unknown"
}
}
extra["versionChannel"] = versionChannel
extra["gitCommitShort"] = git("rev-parse", "--short", "HEAD")
extra["gitCommitFull"] = git("rev-parse", "HEAD")
extra["gitBranch"] = git("rev-parse", "--abbrev-ref", "HEAD")
subprojects {
group = rootProject.group
version = rootProject.version
}