Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for API tests, Simplify Targets #1066

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,6 @@ src/Tools/
**/Droid/**/[Rr]esource.[Dd]esigner.cs
**/*.Android.*/**/[Rr]esource.[Dd]esigner.cs
**/*.Droid.*/**/[Rr]esource.[Dd]esigner.cs

# API Approval
src/*.Tests/API/*.received.txt
9 changes: 6 additions & 3 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<ImplicitUsings>true</ImplicitUsings>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);VSSpell001;SA1010</NoWarn>

<!-- disable sourcelink on mono, to workaround https://github.com/dotnet/sourcelink/issues/155 -->
Expand All @@ -37,6 +38,8 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<SplatTargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</SplatTargetFrameworks>
<SplatWindowsTargetFrameworks>net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</SplatWindowsTargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$(IsTestProject) != 'true'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Expand All @@ -53,7 +56,7 @@

<ItemGroup Condition="$(IsTestProject) or $(MSBuildProjectName.Contains('TestRunner'))">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0" />
Expand All @@ -62,8 +65,8 @@
</ItemGroup>

<ItemGroup Condition="$(IsTestProject)">
<PackageReference Include="xunit.runner.console" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="xunit.runner.console" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0" />
</ItemGroup>

Expand Down
36 changes: 18 additions & 18 deletions src/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);NET_45;XAML</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.iOS'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;IOS</DefineConstants>
<PropertyGroup Condition="$(TargetFramework.StartsWith('MonoAndroid'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-ios')) or $(TargetFramework.StartsWith('net7.0-ios')) or $(TargetFramework.StartsWith('net8.0-ios'))">
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.iOS'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;IOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac'))">
<DefineConstants>$(DefineConstants);MONO;COCOA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-macos')) or $(TargetFramework.StartsWith('net7.0-macos')) or $(TargetFramework.StartsWith('net8.0-macos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.TVOS'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;TVOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-tvos')) or $(TargetFramework.StartsWith('net7.0-tvos')) or $(TargetFramework.StartsWith('net8.0-tvos'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;TVOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-maccatalyst')) or $(TargetFramework.StartsWith('net7.0-maccatalyst')) or $(TargetFramework.StartsWith('net8.0-maccatalyst'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;MACCATALYST</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.WatchOS'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('MonoAndroid'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-android')) or $(TargetFramework.StartsWith('net7.0-android')) or $(TargetFramework.StartsWith('net8.0-android'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('tizen'))">
<DefineConstants>$(DefineConstants);TIZEN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.EndsWith('0-ios'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;IOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.EndsWith('0-macos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.EndsWith('0-tvos'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;TVOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.EndsWith('0-maccatalyst'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;MACCATALYST</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.EndsWith('0-android'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Equals('net6.0')) or $(TargetFramework.Equals('net7.0')) or $(TargetFramework.Equals('net8.0')) or $(TargetFramework.Equals('netstandard2.1')) or $(TargetFramework.Equals('netstandard2.0'))">
<DefineConstants>$(DefineConstants);IS_SHARED_NET</DefineConstants>
</PropertyGroup>
Expand Down
5 changes: 2 additions & 3 deletions src/Splat.AppCenter/Splat.AppCenter.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</TargetFrameworks>
<!--need to consider? monoandroid50;xamarin.ios10,uap10.0 -->
<TargetFrameworks>netstandard2.0;$(SplatWindowsTargetFrameworks)</TargetFrameworks>
<!--need to consider? monoandroid50;xamarin.ios10 -->
<AssemblyName>Splat.AppCenter</AssemblyName>
<RootNamespace>Splat</RootNamespace>
<Authors>.NET Foundation and Contributors</Authors>
<Description>Visual Studio AppCenter integrations for Splat</Description>
<PackageId>Splat.AppCenter</PackageId>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(SplatTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462</TargetFrameworks>
<AssemblyName>Splat.ApplicationInsights</AssemblyName>
<RootNamespace>Splat</RootNamespace>
<Authors>.NET Foundation and Contributors</Authors>
<Description>ApplicationInsights integrations for Splat</Description>
<PackageId>Splat.ApplicationInsights</PackageId>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
Expand Down
3 changes: 1 addition & 2 deletions src/Splat.Autofac/Splat.Autofac.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(SplatTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462</TargetFrameworks>
<Description>Autofac adapter for Splat</Description>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading
Loading