Skip to content

Commit

Permalink
Upgrade to .NET 8 (#4)
Browse files Browse the repository at this point in the history
* Update to .NET 8

* Update README

* Add JDK setup step in build actions
  • Loading branch information
wcabus authored Jan 7, 2024
1 parent 44ca492 commit b260db6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ jobs:
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'

dotnet-version: '8.x'

- uses: actions/setup-java@v4
with:
java-version: '21.x'
distribution: 'microsoft'

- uses: actions/checkout@v3

- run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ jobs:

- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
dotnet-version: '8.x'

- uses: actions/setup-java@v4
with:
java-version: '21.x'
distribution: 'microsoft'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DooM#

This is a vanilla port of the [DooM source code](https://github.com/id-Software/DOOM/tree/master/linuxdoom-1.10) to C#, currently targeting .NET 7.
This is a vanilla port of the [DooM source code](https://github.com/id-Software/DOOM/tree/master/linuxdoom-1.10) to C#, currently targeting .NET 8.


We currently support two platforms:
Expand All @@ -9,7 +9,7 @@ We currently support two platforms:

## Getting started

* Make sure you have the .NET 7 SDK installed: https://dotnet.microsoft.com/en-us/download .
* Make sure you have the .NET 8 SDK installed: https://dotnet.microsoft.com/en-us/download .

* Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads), there's a free community edition available, or use [VS Code](https://code.visualstudio.com/) if you want a lightweight editor. You can also check out [Rider](https://www.jetbrains.com/rider) from JetBrains if you're more familiar with IntelliJ.

Expand Down
2 changes: 1 addition & 1 deletion src/DoomSharp.Core/DoomSharp.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-android</TargetFramework>
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
13 changes: 7 additions & 6 deletions src/DoomSharp.Maui/DoomSharp.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>DoomSharp.Maui</RootNamespace>
<UseMaui>true</UseMaui>
Expand Down Expand Up @@ -33,13 +33,13 @@
</PropertyGroup>

<!-- Android -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-android')) != true">
<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-android')) != true">
<Compile Remove="**\**\*.Android.cs" />
<None Include="**\**\*.Android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

<!-- iOS and Mac Catalyst -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-ios')) != true AND $(TargetFramework.StartsWith('net7.0-maccatalyst')) != true">
<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-ios')) != true AND $(TargetFramework.StartsWith('net8.0-maccatalyst')) != true">
<Compile Remove="**\**\*.MaciOS.cs" />
<None Include="**\**\*.MaciOS.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
Expand Down Expand Up @@ -69,6 +69,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.3" />
<PackageReference Include="SkiaSharp" Version="2.88.6" />
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="2.88.6" />
</ItemGroup>
Expand All @@ -77,7 +78,7 @@
<ProjectReference Include="..\DoomSharp.Core\DoomSharp.Core.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-android'))">
<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-android'))">
<ProjectReference Include="..\DoomSharp.Droid.Bindings\DoomSharp.Droid.Bindings.csproj" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/DoomSharp.Windows/DoomSharp.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<PlatformTarget>x64</PlatformTarget>
Expand Down

0 comments on commit b260db6

Please sign in to comment.