From fdbea08b3cbadd995e71c57a09de8a1808b19ccb Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 18 Jul 2024 23:10:54 +0100 Subject: [PATCH] Set version correctly for spark-paper --- spark-paper/build.gradle | 6 ++++++ .../main/java/me/lucko/spark/paper/PaperSparkPlugin.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spark-paper/build.gradle b/spark-paper/build.gradle index be0aa0de..e57b3fed 100644 --- a/spark-paper/build.gradle +++ b/spark-paper/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'net.kyori.blossom' version '1.3.0' id 'io.github.goooler.shadow' version '8.1.7' id 'maven-publish' } @@ -21,6 +22,11 @@ repositories { maven { url "https://repo.papermc.io/repository/maven-public/" } } +blossom { + replaceTokenIn('src/main/java/me/lucko/spark/paper/PaperSparkPlugin.java') + replaceToken '@version@', project.pluginVersion +} + shadowJar { archiveFileName = "spark-${project.pluginVersion}-paper.jar" archiveClassifier = '' diff --git a/spark-paper/src/main/java/me/lucko/spark/paper/PaperSparkPlugin.java b/spark-paper/src/main/java/me/lucko/spark/paper/PaperSparkPlugin.java index 4924812c..0e348f23 100644 --- a/spark-paper/src/main/java/me/lucko/spark/paper/PaperSparkPlugin.java +++ b/spark-paper/src/main/java/me/lucko/spark/paper/PaperSparkPlugin.java @@ -103,7 +103,7 @@ public void onServerTickEnd(double duration) { @Override public String getVersion() { - return "TODO"; // TODO - get from package implementation version? + return "@version@"; } @Override