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:
parent
d30c70c8c4
commit
13cfe8db13
@ -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()
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user