mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-20 21:21:37 +01:00
Always include build number
This commit is contained in:
parent
35c28e0141
commit
93a3e533f5
@ -3,7 +3,7 @@ import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
plugins {
|
||||
`java`
|
||||
java
|
||||
alias(libs.plugins.shadowjar)
|
||||
application
|
||||
}
|
||||
@ -46,17 +46,11 @@ tasks {
|
||||
// Always inject timestamp & version
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
var number = "unknown";
|
||||
|
||||
if (gradle.startParameter.taskNames.contains("publish")) {
|
||||
number = System.getProperty("build.number", "unknown");
|
||||
}
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(
|
||||
"libsdisguisesVersion" to project(":plugin").version,
|
||||
"timestamp" to DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm").format(LocalDateTime.now()),
|
||||
"buildNumber" to number
|
||||
"buildNumber" to System.getProperty("build.number", "unknown")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user