0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-12 16:50:43 -05:00

Merge pull request 'Implemented plugin version autogeneration based on assembly version for Aki.Common' (!12) from feature/autogenerated-plugin-version-attributes into master

Reviewed-on: SPT-AKI/Modules#12
This commit is contained in:
chomp 2023-06-21 13:14:53 +00:00
commit 42a3913ace
6 changed files with 45 additions and 5 deletions

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<Version>1.0.0.0</Version>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<PropertyGroup>
@ -21,4 +22,29 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<!-- Modified version of the BepInEx.PluginInfoProps plugin info generator -->
<Target Name="AddGeneratedFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)GeneratedFile.cs">
<PropertyGroup>
<BepInExPluginVersion Condition="'$(BepInExPluginVersion)' == ''">$(Version)</BepInExPluginVersion>
<GeneratedText>
// --- Autogenerated file ---
// ----- Do not modify! -----
namespace $(RootNamespace)
{
public static class AkiPluginInfo
{
public const string PLUGIN_VERSION = "$(BepInExPluginVersion)"%3B
}
}
</GeneratedText>
<GeneratedFilePath>.\AkiPluginInfo.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" Overwrite="true" />
</Target>
</Project>

View File

@ -0,0 +1,10 @@
// --- Autogenerated file ---
// ----- Do not modify! -----
namespace Aki.Common
{
public static class AkiPluginInfo
{
public const string PLUGIN_VERSION = "1.0.0.0";
}
}

View File

@ -1,10 +1,11 @@
using System;
using Aki.Common;
using Aki.Core.Patches;
using BepInEx;
namespace Aki.Core
{
[BepInPlugin("com.spt-aki.core", "AKI.Core", "1.0.0")]
[BepInPlugin("com.spt-aki.core", "AKI.Core", AkiPluginInfo.PLUGIN_VERSION)]
class AkiCorePlugin : BaseUnityPlugin
{
public AkiCorePlugin()

View File

@ -1,4 +1,5 @@
using System;
using Aki.Common;
using Aki.Custom.Airdrops.Patches;
using Aki.Custom.Patches;
using Aki.Custom.Utils;
@ -6,7 +7,7 @@ using BepInEx;
namespace Aki.Custom
{
[BepInPlugin("com.spt-aki.custom", "AKI.Custom", "1.0.0")]
[BepInPlugin("com.spt-aki.custom", "AKI.Custom", AkiPluginInfo.PLUGIN_VERSION)]
class AkiCustomPlugin : BaseUnityPlugin
{
public AkiCustomPlugin()

View File

@ -1,10 +1,11 @@
using System;
using Aki.Common;
using Aki.Debugging.Patches;
using BepInEx;
namespace Aki.Debugging
{
[BepInPlugin("com.spt-aki.debugging", "AKI.Debugging", "1.0.0")]
[BepInPlugin("com.spt-aki.debugging", "AKI.Debugging", AkiPluginInfo.PLUGIN_VERSION)]
public class AkiDebuggingPlugin : BaseUnityPlugin
{
public AkiDebuggingPlugin()

View File

@ -1,4 +1,5 @@
using System;
using Aki.Common;
using Aki.SinglePlayer.Patches.Healing;
using Aki.SinglePlayer.Patches.MainMenu;
using Aki.SinglePlayer.Patches.Progression;
@ -9,7 +10,7 @@ using BepInEx;
namespace Aki.SinglePlayer
{
[BepInPlugin("com.spt-aki.singleplayer", "AKI.Singleplayer", "1.0.0")]
[BepInPlugin("com.spt-aki.singleplayer", "AKI.Singleplayer", AkiPluginInfo.PLUGIN_VERSION)]
class AkiSingleplayerPlugin : BaseUnityPlugin
{
public AkiSingleplayerPlugin()