From ae3075770d35488d8550f87fb522d91dc4e2e212 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sat, 29 Jun 2024 22:15:35 +0200 Subject: [PATCH] Add EngineConfiguration#versioningString --- .../sosengine/base/annotations/EventListener.java | 2 ++ .../base/data/info/EngineInformation.java | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/base/src/main/java/de/staropensource/sosengine/base/annotations/EventListener.java b/base/src/main/java/de/staropensource/sosengine/base/annotations/EventListener.java index 4d575fe..8dc1d29 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/annotations/EventListener.java +++ b/base/src/main/java/de/staropensource/sosengine/base/annotations/EventListener.java @@ -27,6 +27,8 @@ import java.lang.annotation.*; /** * Annotation for registering events on methods. + * + * @since 1-alpha0 */ @SuppressWarnings("unused") @Retention(RetentionPolicy.RUNTIME) diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java b/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java index 5a78fea..bf7d850 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java @@ -112,6 +112,19 @@ public final class EngineInformation { */ private String versioningFork; + /** + * Provides the engine's full version string. + * + * @since 1-alpha1 + * + * -- GETTER -- + * Provides the engine's full version string. + * + * @return engine version string + * @since 1-alpha1 + */ + private String versioningString; + /** * Provides the {@code dirty} value (i.e. if the source tree has been modified). @@ -418,6 +431,7 @@ public final class EngineInformation { versioningType = VersionType.valueOf(gradleParser.getString("versioningType").toUpperCase()); versioningTyperelease = gradleParser.getInteger("versioningTyperelease", true); versioningFork = gradleParser.getString("versioningFork"); + versioningString = "v" + versioningVersion + "-" + (versioningType == VersionType.RELEASE_CANDIDATE ? "releasecandidate" : versioningType.name()) + versioningTyperelease + versioningFork; dependencyLombok = gradleParser.getString("dependencyLombok"); dependencyJetbrainsAnnotations = gradleParser.getString("dependencyJetbrainsAnnotations");