From 769f086cb53cc10bf4466085ba0d2ae251b14999 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel Date: Tue, 12 Sep 2023 16:04:27 +0400 Subject: [PATCH] include build date --- RedisBungee-API/build.gradle.kts | 2 ++ .../java/com/imaginarycode/minecraft/redisbungee/Constants.java | 1 + 2 files changed, 3 insertions(+) diff --git a/RedisBungee-API/build.gradle.kts b/RedisBungee-API/build.gradle.kts index db1651e..50f5751 100644 --- a/RedisBungee-API/build.gradle.kts +++ b/RedisBungee-API/build.gradle.kts @@ -1,3 +1,4 @@ +import java.time.Instant import java.io.ByteArrayOutputStream plugins { @@ -48,6 +49,7 @@ blossom { commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it. commitStdout.close() replaceToken("@git_commit@", commit) + replaceToken("@build_date@", "${Instant.now().epochSecond}") } java { diff --git a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/Constants.java b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/Constants.java index 4471b0f..23201b0 100644 --- a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/Constants.java +++ b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/Constants.java @@ -15,6 +15,7 @@ public class Constants { public final static String VERSION = "@version@"; public final static String GIT_COMMIT = "@git_commit@"; + public final static long BUILD_DATE = Long.parseLong("@build_date@"); public static String getGithubCommitLink() { return "https://github.com/ProxioDev/RedisBungee/commit/" + GIT_COMMIT;