Skip to content

Commit

Permalink
Reorganize projects
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Nov 7, 2023
1 parent f3c66d9 commit dd6e1b4
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 53 deletions.
File renamed without changes.
43 changes: 43 additions & 0 deletions MonoGame.Library.BuildScripts/MonoGame.Librar.BuildScripts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Resources/Icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>Icon.png</LogicalName>
</EmbeddedResource>

<EmbeddedResource Include="Resources/MonoGame.Library.X.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>MonoGame.Library.X.txt</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Using Include="Cake.Frosting" />
<Using Include="Cake.Common.Build" />
<Using Include="Cake.Common.Diagnostics" />
<Using Include="Cake.Common.Tools.DotNet" />
<Using Include="Cake.Common.Tools.DotNet.MSBuild" />
<Using Include="Cake.Common.Tools.DotNet.Pack" />
<Using Include="Cake.Common.IO" />
<Using Include="Cake.Common" />
<Using Include="Cake.Core" />
<Using Include="Cake.Core.Diagnostics" />
<Using Include="Cake.Core.IO" />
<Using Include="Cake.FileHelpers" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
<PackageReference Include="Cake.Frosting" Version="3.1.0" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes
File renamed without changes.
3 changes: 0 additions & 3 deletions build/Tasks.cs → MonoGame.Library.BuildScripts/Tasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
namespace BuildScripts;

[TaskName("BuildLibrary")]
[IsDependentOn(typeof(BuildWindowsTask))]
[IsDependentOn(typeof(BuildMacOSTask))]
[IsDependentOn(typeof(BuildLinuxTask))]
public class BuildLibraryTask : FrostingTask { }

[TaskName("TestLibrary")]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
86 changes: 36 additions & 50 deletions build/Build.csproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Resources/Icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>Icon.png</LogicalName>
</EmbeddedResource>

<EmbeddedResource Include="Resources/MonoGame.Library.X.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>MonoGame.Library.X.txt</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Compile Include="../src/BuildWindowsTask.cs" />
<Compile Include="../src/BuildMacOSTask.cs" />
<Compile Include="../src/BuildLinuxTask.cs" />
</ItemGroup>

<ItemGroup>
<Using Include="Cake.Frosting" />
<Using Include="Cake.Common.Build" />
<Using Include="Cake.Common.Diagnostics" />
<Using Include="Cake.Common.Tools.DotNet" />
<Using Include="Cake.Common.Tools.DotNet.MSBuild" />
<Using Include="Cake.Common.Tools.DotNet.Pack" />
<Using Include="Cake.Common.IO" />
<Using Include="Cake.Common" />
<Using Include="Cake.Core" />
<Using Include="Cake.Core.Diagnostics" />
<Using Include="Cake.Core.IO" />
<Using Include="Cake.FileHelpers" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
<PackageReference Include="Cake.Frosting" Version="3.1.0" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<Using Include="Cake.Frosting" />
<Using Include="Cake.Common.Build" />
<Using Include="Cake.Common.Diagnostics" />
<Using Include="Cake.Common.Tools.DotNet" />
<Using Include="Cake.Common.Tools.DotNet.MSBuild" />
<Using Include="Cake.Common.Tools.DotNet.Pack" />
<Using Include="Cake.Common.IO" />
<Using Include="Cake.Common" />
<Using Include="Cake.Core" />
<Using Include="Cake.Core.Diagnostics" />
<Using Include="Cake.Core.IO" />
<Using Include="Cake.FileHelpers" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
<PackageReference Include="Cake.Frosting" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MonoGame.Library.BuildScripts\MonoGame.Librar.BuildScripts.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/BuildLinuxTask.cs → build/BuildLinuxTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace BuildScripts;

[TaskName("Build Linux")]
[IsDependentOn(typeof(PrepTask))]
[IsDependeeOf(typeof(BuildLibraryTask))]
public sealed class BuildLinuxTask : FrostingTask<BuildContext>
{
public override bool ShouldRun(BuildContext context) => context.IsRunningOnLinux();
Expand Down
1 change: 1 addition & 0 deletions src/BuildMacOSTask.cs → build/BuildMacOSTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace BuildScripts;

[TaskName("Build macOS")]
[IsDependentOn(typeof(PrepTask))]
[IsDependeeOf(typeof(BuildLibraryTask))]
public sealed class BuildMacOSTask : FrostingTask<BuildContext>
{
public override bool ShouldRun(BuildContext context) => context.IsRunningOnMacOs();
Expand Down
1 change: 1 addition & 0 deletions src/BuildWindowsTask.cs → build/BuildWindowsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace BuildScripts;

[TaskName("Build Windows")]
[IsDependentOn(typeof(PrepTask))]
[IsDependeeOf(typeof(BuildLibraryTask))]
public sealed class BuildWindowsTask : FrostingTask<BuildContext>
{
public override bool ShouldRun(BuildContext context) => context.IsRunningOnWindows();
Expand Down
1 change: 1 addition & 0 deletions build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public static class Program
{
public static int Main(string[] args)
=> new CakeHost()
.AddAssembly(typeof(BuildContext).Assembly)
.UseWorkingDirectory("../")
.UseContext<BuildContext>()
.Run(args);
Expand Down

0 comments on commit dd6e1b4

Please sign in to comment.