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

View File

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