From ec1b99498ab2cead4ebe9d7a17618edb29933ea8 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 30 Apr 2025 09:51:55 -0500 Subject: [PATCH] feat: set base MinimumEssentialsFrameworkVersion to Essentials version --- src/Directory.Build.props | 2 +- .../Devices/EssentialsDevice.cs | 8 ++++++++ .../PepperDash.Essentials.Core.csproj | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 152c9f18..f184e51f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 2.4.0-local + 2.4.0-local $(Version) PepperDash Technology PepperDash Technology diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs index bdb8b45a..01ff0895 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs @@ -196,10 +196,18 @@ namespace PepperDash.Essentials.Core /// public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice { + +#if ESSENTIALS_VERSION + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// + public string MinimumEssentialsFrameworkVersion { get; protected set; } = ESSENTIALS_VERSION +#else /// /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") /// public string MinimumEssentialsFrameworkVersion { get; protected set; } +#endif } public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice diff --git a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj index b1406d69..84e6c5c8 100644 --- a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj +++ b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj @@ -1,6 +1,7 @@  Debug;Release;Debug 4.7.2 + $(DefineConstants);ESSENTIALS_VERSION=$(Version) net472