2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-03-22 07:50:47 +00:00

maintenance: move to blossom v2 and use indragit to get git info

This commit is contained in:
Mohammed Alteneiji 2026-03-17 00:17:12 +04:00
parent d30c70c8c4
commit 13cfe8db13
Signed by: ham1255
GPG Key ID: EF343502046229F4
2 changed files with 11 additions and 14 deletions

View File

@ -4,6 +4,7 @@ plugins {
`java-library`
`maven-publish`
alias(libs.plugins.blossom)
alias(libs.plugins.indragit)
}
@ -17,21 +18,17 @@ dependencies {
description = "RedisBungee interfaces"
blossom {
replaceToken("@version@", "$version")
// GIT
val commit: String;
val commitStdout = ByteArrayOutputStream()
rootProject.exec {
standardOutput = commitStdout
commandLine("git", "rev-parse", "HEAD")
sourceSets {
main {
blossom {
javaSources {
property("version", "$version")
property("git-commit", indraGit.commit().toString())
}
}
}
commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it.
commitStdout.close()
replaceToken("@git_commit@", commit)
}
java {
withJavadocJar()
withSourcesJar()

View File

@ -13,8 +13,8 @@ package com.imaginarycode.minecraft.redisbungee;
public class Constants {
public final static String VERSION = "@version@";
public final static String GIT_COMMIT = "@git_commit@";
public final static String VERSION = "{{ version }}";
public final static String GIT_COMMIT = "{{ git-commit }}";
public static String getGithubCommitLink() {
return "https://github.com/ProxioDev/ValioBungee/commit/" + GIT_COMMIT;