mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 02:50:45 -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:
commit
42a3913ace
@ -1,6 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<Version>1.0.0.0</Version>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@ -21,4 +22,29 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
||||||
|
10
project/Aki.Common/AkiPluginInfo.cs
Normal file
10
project/Aki.Common/AkiPluginInfo.cs
Normal 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";
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Aki.Common;
|
||||||
using Aki.Core.Patches;
|
using Aki.Core.Patches;
|
||||||
using BepInEx;
|
using BepInEx;
|
||||||
|
|
||||||
namespace Aki.Core
|
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
|
class AkiCorePlugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public AkiCorePlugin()
|
public AkiCorePlugin()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Aki.Common;
|
||||||
using Aki.Custom.Airdrops.Patches;
|
using Aki.Custom.Airdrops.Patches;
|
||||||
using Aki.Custom.Patches;
|
using Aki.Custom.Patches;
|
||||||
using Aki.Custom.Utils;
|
using Aki.Custom.Utils;
|
||||||
@ -6,7 +7,7 @@ using BepInEx;
|
|||||||
|
|
||||||
namespace Aki.Custom
|
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
|
class AkiCustomPlugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public AkiCustomPlugin()
|
public AkiCustomPlugin()
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Aki.Common;
|
||||||
using Aki.Debugging.Patches;
|
using Aki.Debugging.Patches;
|
||||||
using BepInEx;
|
using BepInEx;
|
||||||
|
|
||||||
namespace Aki.Debugging
|
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 class AkiDebuggingPlugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public AkiDebuggingPlugin()
|
public AkiDebuggingPlugin()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Aki.Common;
|
||||||
using Aki.SinglePlayer.Patches.Healing;
|
using Aki.SinglePlayer.Patches.Healing;
|
||||||
using Aki.SinglePlayer.Patches.MainMenu;
|
using Aki.SinglePlayer.Patches.MainMenu;
|
||||||
using Aki.SinglePlayer.Patches.Progression;
|
using Aki.SinglePlayer.Patches.Progression;
|
||||||
@ -9,7 +10,7 @@ using BepInEx;
|
|||||||
|
|
||||||
namespace Aki.SinglePlayer
|
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
|
class AkiSingleplayerPlugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public AkiSingleplayerPlugin()
|
public AkiSingleplayerPlugin()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user