Skip to content

Commit 55d1de0

Browse files
committed
build: Simplify csproj files by moving more properties to common file
Move more properties to the inherited common target file, so we aren't repeating things in all of our project files
1 parent d949ab8 commit 55d1de0

File tree

9 files changed

+22
-106
lines changed

9 files changed

+22
-106
lines changed

Buttplug.Client.Connectors.WebsocketConnector/Buttplug.Client.Connectors.WebsocketConnector.csproj

-15
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,8 @@
1515
<Title>Buttplug Client Websocket Connector</Title>
1616
<Summary>Websocket Connection Capabilities for Buttplug Clients</Summary>
1717
<Description>Websocket Connection Capabilities for Buttplug Clients. (.Net Framework 4.7+/.Net Standard 2.0)</Description>
18-
19-
<!-- Generate nuget packages and assembly files -->
20-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
21-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
22-
23-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
24-
<IncludeSource>True</IncludeSource>
25-
<IncludeSymbols>True</IncludeSymbols>
26-
27-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
28-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
2918
</PropertyGroup>
3019

31-
<PropertyGroupCondition=" '$(Configuration)' == 'Debug' ">
32-
<DebugType>full</DebugType>
33-
</PropertyGroup>
34-
3520
<ItemGroup>
3621
<PackageReferenceInclude="deniszykov.WebSocketListener"Version="4.2.4" />
3722
<PackageReferenceInclude="GitInfo"Version="2.0.20">

Buttplug.ProjectFiles/CommonProjectProperties.targets

+19-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
<GitIgnoreTagVersion>false</GitIgnoreTagVersion>
1414
<GitSkipCache>true</GitSkipCache>
1515
</PropertyGroup>
16-
<TargetName="CommonProjectProperties"
17-
DependsOnTargets="GitVersion"
18-
Condition="'$(GitInfoImported)' == 'true' And '$(ExcludeRestorePackageImports)' != 'true'">
16+
<TargetName="CommonProjectProperties"DependsOnTargets="GitVersion">
1917
<PropertyGroup>
2018
<RootNamespace>Buttplug</RootNamespace>
2119
<Product>Buttplug</Product>
@@ -29,6 +27,24 @@
2927
<!-- each project should have a LICENSE resource if it needs to be packaged -->
3028
<PackageLicenseFile>LICENSE</PackageLicenseFile>
3129

30+
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
31+
<IncludeSource>True</IncludeSource>
32+
<IncludeSymbols>True</IncludeSymbols>
33+
34+
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
35+
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
36+
</PropertyGroup>
37+
38+
<PropertyGroupCondition=" '$(Configuration)' == 'Debug' ">
39+
<DebugType>full</DebugType>
40+
</PropertyGroup>
41+
42+
<PropertyGroup
43+
Condition="'$(GitInfoImported)' == 'true' And '$(ExcludeRestorePackageImports)' != 'true'">
44+
<!-- Generate nuget packages and assembly files only when we're a git repo -->
45+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
46+
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
47+
3248
<PackageVersionCondition="'$(CI)' != 'true' and '$(GitCommits)' != '0'">$(GitBaseTag)-$(GitBranch).9999-$(GitCommit)</PackageVersion>
3349
<PackageVersionCondition="'$(CI)' == 'true' and '$(GitCommits)' != '0'">$(GitBaseTag).$(BUILD_BUILDID)-$(GitBranch)-$(GitCommit)</PackageVersion>
3450
<PackageVersionCondition="'$(GitCommits)' == '0'">$(GitBaseTag)</PackageVersion>

Buttplug.Server.Connectors.WebsocketServer/Buttplug.Server.Connectors.WebsocketServer.csproj

-15
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,8 @@
1414
<Title>Buttplug Server Websocket Connector</Title>
1515
<Summary>Buttplug Server Websocket Connector</Summary>
1616
<Description>Websocket Connection Capabilities for Buttplug Servers. (.Net Framework 4.7+/.Net Standard 2.0)</Description>
17-
18-
<!-- Generate nuget packages and assembly files -->
19-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
20-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
21-
22-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
23-
<IncludeSource>True</IncludeSource>
24-
<IncludeSymbols>True</IncludeSymbols>
25-
26-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
27-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
2817
</PropertyGroup>
2918

30-
<PropertyGroupCondition=" '$(Configuration)' == 'Debug' ">
31-
<DebugType>full</DebugType>
32-
</PropertyGroup>
33-
3419
<ItemGroup>
3520
<PackageReferenceInclude="deniszykov.WebSocketListener"Version="4.2.4" />
3621
<PackageReferenceInclude="GitInfo"Version="2.0.20">

Buttplug.Server.Managers.HidSharpManager/Buttplug.Server.Managers.HidSharpManager.csproj

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
<Title>Buttplug HidSharp Subtype Manager</Title>
1515
<Summary>Buttplug Server Hid Device and Serial Port Subtype Manager</Summary>
1616
<Description>Buttplug Server Hid Device and Serial Port Subtype Manager, based on the HidSharp Library. (.Net Framework 4.7+/.Net Standard 2.0)</Description>
17-
18-
<!-- Generate nuget packages and assembly files -->
19-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
20-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
21-
22-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
23-
<IncludeSource>True</IncludeSource>
24-
<IncludeSymbols>True</IncludeSymbols>
25-
26-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
2717
</PropertyGroup>
2818

2919
<ItemGroup>

Buttplug.Server.Managers.UWPBluetoothManager/Buttplug.Server.Managers.UWPBluetoothManager.csproj

-11
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@
99
<AssemblyName>Buttplug.Server.Managers.UWPBluetoothManager</AssemblyName>
1010
<Summary>Buttplug UWP Bluetooth Device Subtype Manager</Summary>
1111
<Description>UWP Bluetooth (Windows 10 15063 Creators Update or Later) device support for Buttplug Servers. (.Net Framework 4.7+ only)</Description>
12-
13-
<!-- Generate nuget packages and assembly files -->
14-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
15-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
16-
17-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
18-
<IncludeSource>True</IncludeSource>
19-
<IncludeSymbols>True</IncludeSymbols>
20-
21-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
22-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
2312
</PropertyGroup>
2413
<ItemGroup>
2514
<PackageReferenceInclude="GitInfo"Version="2.0.20">

Buttplug.Server.Managers.WinUSBManager/Buttplug.Server.Managers.WinUSBManager.csproj

-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@
1010
<AssemblyName>Buttplug.Server.Managers.WinUSBManager</AssemblyName>
1111
<Summary>Buttplug WinUSB Device Subtype Manager</Summary>
1212
<Description>WinUSB device support (Rez Trancevibrator) for Buttplug Servers. (.Net Framework 4.7+ only)</Description>
13-
14-
<!-- Generate nuget packages and assembly files -->
15-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
16-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
17-
18-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
19-
<IncludeSource>True</IncludeSource>
20-
<IncludeSymbols>True</IncludeSymbols>
21-
22-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
23-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
2413
</PropertyGroup>
2514
<ItemGroup>
2615
<PackageReferenceInclude="GitInfo"Version="2.0.20">

Buttplug.Server.Managers.XInputGamepadManager/Buttplug.Server.Managers.XInputGamepadManager.csproj

-15
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,6 @@
99
<AssemblyName>Buttplug.Server.Managers.XInputGamepadManager</AssemblyName>
1010
<Summary>Buttplug XInput Gamepad Device Subtype Manager</Summary>
1111
<Description>Adds XInput Device enumeration and vibration/rumble control to Buttplug. (.Net Framework 4.7+ Only)</Description>
12-
13-
<!-- Generate nuget packages and assembly files -->
14-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
15-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
16-
17-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
18-
<IncludeSource>True</IncludeSource>
19-
<IncludeSymbols>True</IncludeSymbols>
20-
21-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
22-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
23-
</PropertyGroup>
24-
25-
<PropertyGroupCondition=" '$(Configuration)' == 'Debug' ">
26-
<DebugType>full</DebugType>
2712
</PropertyGroup>
2813

2914
<ItemGroup>

Buttplug.Server.Managers.XamarinBluetoothManager/Buttplug.Server.Managers.XamarinBluetoothManager.csproj

+3-11
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@
1111
<AssemblyName>Buttplug.Server.Managers.XamarinBluetoothManager</AssemblyName>
1212
<Summary>Buttplug Xamarin Bluetooth Manager</Summary>
1313
<Description>Xamarin Bluetooth LE (Android/iOS) device support for Buttplug Servers, using Plugin.BLE. (.Net Standard 2.0)</Description>
14-
15-
<!-- Generate nuget packages and assembly files -->
16-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
17-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
18-
19-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
20-
<IncludeSource>True</IncludeSource>
21-
<IncludeSymbols>True</IncludeSymbols>
22-
23-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
24-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
2514
</PropertyGroup>
2615

2716
<ItemGroup>
@@ -36,4 +25,7 @@
3625
<ProjectReferenceInclude="..\Buttplug\Buttplug.csproj" />
3726
</ItemGroup>
3827

28+
<ItemGroup>
29+
<NoneInclude="LICENSE"Pack="true"PackagePath="" />
30+
</ItemGroup>
3931
</Project>

Buttplug/Buttplug.csproj

-15
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,6 @@
1212
<AssemblyName>Buttplug</AssemblyName>
1313
<Summary>Buttplug Sex Toy Control Library</Summary>
1414
<Description>Buttplug Sex Toy Control Library. Contains Core (messages, logging, etc), Server (device management), and Client (API) components. (.Net Framework 4.7+/.Net Standard 2.0)</Description>
15-
16-
<!-- Generate nuget packages and assembly files -->
17-
<GeneratePackageOnBuildCondition="'$(GitInfoImported)' == 'true'">true</GeneratePackageOnBuild>
18-
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
19-
20-
<!-- Generate Symbols (*.pdb) files in their own package for easier debugging by consuming apps -->
21-
<IncludeSource>True</IncludeSource>
22-
<IncludeSymbols>True</IncludeSymbols>
23-
24-
<CodeAnalysisRuleSet>..\Buttplug.ProjectFiles\ButtplugCodeAnalysisRules.ruleset</CodeAnalysisRuleSet>
25-
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
26-
</PropertyGroup>
27-
28-
<PropertyGroupCondition=" '$(Configuration)' == 'Debug' ">
29-
<DebugType>full</DebugType>
3015
</PropertyGroup>
3116

3217
<ItemGroup>

0 commit comments

Comments
 (0)
close