Use .NET 8 SDK

This commit is contained in:
js6pak committed 2023-12-04 21:52:22 +01:00
1 parent 6eb0bf19c3
commit 1f2e2402e8
9 files changed
+19 -35

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ on: ["push", "pull_request"]
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -23,7 +23,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: 6.x dotnet-version: 8.0.x
- name: Run the Cake script - name: Run the Cake script
uses: cake-build/cake-action@v1 uses: cake-build/cake-action@v1
+5
View File
@@ -16,6 +16,11 @@
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/NuclearPowered/Reactor</RepositoryUrl> <RepositoryUrl>https://github.com/NuclearPowered/Reactor</RepositoryUrl>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression> <PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
<!-- SourceLink -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
+1 -1
View File
@@ -41,7 +41,7 @@ public class AssetBundleBenchmarks
private AssetBundle LoadAll(AssetBundle assetBundle) private AssetBundle LoadAll(AssetBundle assetBundle)
{ {
if (assetBundle == null) throw new ArgumentNullException(nameof(assetBundle)); ArgumentNullException.ThrowIfNull(assetBundle);
assetBundle.LoadAllAssets(); assetBundle.LoadAllAssets();
return assetBundle; return assetBundle;
+3 -3
View File
@@ -94,18 +94,18 @@ public readonly struct Mod : IEquatable<Mod>
var clientMissing = hostMods.Where(mod => mod.IsRequiredOnAllClients && !clientMods.Contains(mod)).ToArray(); var clientMissing = hostMods.Where(mod => mod.IsRequiredOnAllClients && !clientMods.Contains(mod)).ToArray();
var hostMissing = clientMods.Where(mod => mod.IsRequiredOnAllClients && !hostMods.Contains(mod)).ToArray(); var hostMissing = clientMods.Where(mod => mod.IsRequiredOnAllClients && !hostMods.Contains(mod)).ToArray();
if (clientMissing.Any() || hostMissing.Any()) if (clientMissing.Length != 0 || hostMissing.Length != 0)
{ {
var message = new StringBuilder(); var message = new StringBuilder();
if (clientMissing.Any()) if (clientMissing.Length != 0)
{ {
message.Append("You are missing: "); message.Append("You are missing: ");
message.AppendJoin(", ", clientMissing.Select(x => x.ToString())); message.AppendJoin(", ", clientMissing.Select(x => x.ToString()));
message.AppendLine(); message.AppendLine();
} }
if (hostMissing.Any()) if (hostMissing.Length != 0)
{ {
message.Append("Host is missing: "); message.Append("Host is missing: ");
message.AppendJoin(", ", hostMissing.Select(x => x.ToString())); message.AppendJoin(", ", hostMissing.Select(x => x.ToString()));
+1 -1
View File
@@ -96,7 +96,7 @@ public abstract class UnsafeCustomRpc
/// <param name="ackCallback">The callback to invoke when this packet is acknowledged.</param> /// <param name="ackCallback">The callback to invoke when this packet is acknowledged.</param>
public void UnsafeSend(InnerNetObject innerNetObject, object? data, bool immediately = false, int targetClientId = -1, Action? ackCallback = null) public void UnsafeSend(InnerNetObject innerNetObject, object? data, bool immediately = false, int targetClientId = -1, Action? ackCallback = null)
{ {
if (innerNetObject == null) throw new ArgumentNullException(nameof(innerNetObject)); ArgumentNullException.ThrowIfNull(innerNetObject);
if (Manager == null) if (Manager == null)
{ {
-6
View File
@@ -6,15 +6,9 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- SourceLink -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<Compile Include="..\Reactor.Networking.Shared\**\*.cs" LinkBase="Networking" Visible="false" /> <Compile Include="..\Reactor.Networking.Shared\**\*.cs" LinkBase="Networking" Visible="false" />
</ItemGroup> </ItemGroup>
+1 -2
View File
@@ -1,6 +1,5 @@
global using static Reactor.Utilities.Logger<Reactor.ReactorPlugin>; global using static Reactor.Utilities.Logger<Reactor.ReactorPlugin>;
using System; using System;
using System.Linq;
using BepInEx; using BepInEx;
using BepInEx.Configuration; using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP;
@@ -111,7 +110,7 @@ public partial class ReactorPlugin : BasePlugin
foreach (var pluginInfo in IL2CPPChainloader.Instance.Plugins.Values) foreach (var pluginInfo in IL2CPPChainloader.Instance.Plugins.Values)
{ {
var config = ((BasePlugin) pluginInfo.Instance).Config; var config = ((BasePlugin) pluginInfo.Instance).Config;
if (!config.Any()) if (config.Count == 0)
{ {
continue; continue;
} }
-20
View File
@@ -37,16 +37,6 @@
"Samboy063.Cpp2IL.Core": "2022.1.0-development.866" "Samboy063.Cpp2IL.Core": "2022.1.0-development.866"
} }
}, },
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"StyleCop.Analyzers": { "StyleCop.Analyzers": {
"type": "Direct", "type": "Direct",
"requested": "[1.2.0-beta.435, )", "requested": "[1.2.0-beta.435, )",
@@ -171,11 +161,6 @@
"resolved": "2.1.0", "resolved": "2.1.0",
"contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA==" "contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA=="
}, },
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
},
"Microsoft.Extensions.Logging.Abstractions": { "Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive", "type": "Transitive",
"resolved": "6.0.1", "resolved": "6.0.1",
@@ -191,11 +176,6 @@
"resolved": "1.1.0", "resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
}, },
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
},
"Mono.Cecil": { "Mono.Cecil": {
"type": "Transitive", "type": "Transitive",
"resolved": "0.11.4", "resolved": "0.11.4",
+6
View File
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "latestFeature"
}
}