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

feat: Making CPM optional #886

Merged
merged 5 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"longName": "reactive",
"shortName": "reactive"
},
"cpm": {
"longName": "cpm",
"shortName": "cpm"
},
"wasm-pwa-manifest": {
"longName": "wasm-pwa-manifest",
"shortName": "pwa"
Expand All @@ -54,8 +58,8 @@
"shortName": "vscode"
},
"skipRestore": {
"longName": "skipPackageRestore",
"shortName": "skipRestore"
"longName": "skipRestore",
"shortName": "skip"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"isVisible":true
},
{
"id": "Reactive",
"id": "reactive",
"name": {
"text": "Data - Reactive Extensions"
},
Expand All @@ -141,6 +141,18 @@
},
"defaultValue": "true",
"isVisible":true
},
{
"id": "cpm",
"name": {
"text": "Central Package Management"
},
"description":
{
"text": "Enables Central Package Management - packages are versioned in central Directory.Packages.props file"
},
"defaultValue": "false",
"isVisible":false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@
"defaultValue": "true",
"description": "Whether or not to use Reactive extensions"
},
"cpm": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false",
"description": "Whether or not to use Central Package Management - package versions are via central Directory.Packages.props file"
},
nickrandolph marked this conversation as resolved.
Show resolved Hide resolved
"mobile": {
"type": "computed",
"dataType": "bool",
Expand Down Expand Up @@ -154,6 +160,10 @@
"condition": "tests",
"path": "MyExtensionsApp.UITests\\MyExtensionsApp.UITests.csproj"
},
{
"condition": "cpm",
"path": "Directory.Packages.props"
},
{
"condition": "mobile",
"path": "MyExtensionsApp.Mobile\\MyExtensionsApp.Mobile.csproj"
Expand Down Expand Up @@ -263,6 +273,29 @@
"MyExtensionsApp.UITests/**/*"
]
},
{
"condition": "(!cpm)",
"exclude": [
"MyExtensionsApp//MyExtensionsApp.csproj",
"MyExtensionsApp.Mobile//MyExtensionsApp.Mobile.csproj",
"MyExtensionsApp.Skia.Gtk//MyExtensionsApp.Skia.Gtk.csproj",
"MyExtensionsApp.Skia.Linux.FrameBuffer//MyExtensionsApp.Skia.Linux.FrameBuffer.csproj",
"MyExtensionsApp.Skia.WPF//MyExtensionsApp.Skia.WPF.csproj",
"MyExtensionsApp.Tests//MyExtensionsApp.Tests.csproj",
"MyExtensionsApp.UITests//MyExtensionsApp.UITests.csproj",
"MyExtensionsApp.Wasm//MyExtensionsApp.Wasm.csproj",
"MyExtensionsApp.Windows//MyExtensionsApp.Windows.csproj",
"Directory.Build.props",
"Directory.Packages.props"
]
},
{
"condition": "(cpm)",
"exclude": [
"**/*.nocpm.props",
"**/*.nocpm.csproj"
]
},
{
"condition": "(!vscode)",
"exclude": [
Expand All @@ -275,6 +308,13 @@
"MyExtensionsApp.Wasm/manifest.json",
"MyExtensionsApp.Wasm/Assets/AppIcon-*"
]
},
{
"condition": "(!cpm)",
"rename": {
".nocpm.csproj": ".csproj",
"Directory.Build.nocpm.props": "Directory.Build.props"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project ToolsVersion="15.0">
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<DebugType>portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<SynthesizeLinkMetadata>true</SynthesizeLinkMetadata>

<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);Uno0001;CS1998;CA1416;NU1507</NoWarn>
</PropertyGroup>

<ItemGroup>
<!--This override is used to validate the use of specific version of the C# Compiler-->
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.2.0" PrivateAssets="all" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--#if (android)
<TargetFrameworks>$(TargetFrameworks);net6.0-android</TargetFrameworks>
#endif -->
<!--#if (ios)
<TargetFrameworks>$(TargetFrameworks);net6.0-ios</TargetFrameworks>
#endif -->
<!--#if (macos)
<TargetFrameworks>$(TargetFrameworks);net6.0-macos</TargetFrameworks>
#endif -->
<!--#if (maccatalyst)
<TargetFrameworks>$(TargetFrameworks);net6.0-maccatalyst</TargetFrameworks>
#endif -->
<SingleProject>true</SingleProject>
<OutputType>Exe</OutputType>
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net6.0-ios'">iossimulator-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">maccatalyst-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net6.0-macos'">osx-x64</RuntimeIdentifier>
<!-- Debugger workaround https://github.com/dotnet/maui-samples/blob/8aa6b8780b12e97b157514c3bdc54bb4a13001cd/HelloMacCatalyst/HelloMacCatalyst.csproj#L7 -->
<!-- <MtouchExtraArgs Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">$(MtouchExtraArgs) -setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs> -->
<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug' and '$(TargetFramework)' != 'net6.0-maccatalyst'">True</UseInterpreter>
<IsUnoHead>true</IsUnoHead>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)'=='net6.0-macos'">10.14</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.WinUI" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.6.0-dev.962" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.Material.WinUI" Version="2.4.0-dev.42"/>
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Authentication" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Configuration" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Core" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.Serilog" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive.WinUI" Version="255.255.255.255"/>
</ItemGroup>
<Choose>
<When Condition="'$(TargetFramework)'=='net6.0-android'">
<ItemGroup>
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.4.0.4"/>
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.36" />
</ItemGroup>
<ItemGroup>
<AndroidEnvironment Include="Android/environment.conf" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)'=='net6.0-ios'">
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-ios'">
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
<!-- https://github.com/xamarin/xamarin-macios/issues/14812 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --marshal-objectivec-exceptions:disable</MtouchExtraArgs>
<MtouchExtraArgs>$(MtouchExtraArgs) --registrar:static</MtouchExtraArgs>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.4.0" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)'=='net6.0-maccatalyst'">
<PropertyGroup>
<!-- Configure the GC -->
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
<!-- Required for unknown crash as of .NET 6 Mobile Preview 13 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --registrar:static</MtouchExtraArgs>
<!-- https://github.com/xamarin/xamarin-macios/issues/14812 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --marshal-objectivec-exceptions:disable</MtouchExtraArgs>
<!-- Full globalization is required for Uno -->
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.4.0"/>
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)'=='net6.0-macos'">
<PropertyGroup>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<ProjectReference Include="..\MyExtensionsApp\MyExtensionsApp.csproj" />
</ItemGroup>

<Import Project="..\MyExtensionsApp.UI\MyExtensionsApp.UI.projitems" Label="Shared" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup Condition="exists('..\MyExtensionsApp.Windows')">
<EmbeddedResource Include="..\MyExtensionsApp.Windows\Package.appxmanifest" LogicalName="Package.appxmanifest" />
<Content Include="..\MyExtensionsApp.Windows\Images\StoreLogo.png" Link="Assets\StoreLogo.png" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Include="..\MyExtensionsApp.UI\**\*.xaml" />
</ItemGroup>

<ItemGroup>
<Content Include="Assets\Fonts\uno-fluentui-assets.ttf" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.2" />
<PackageReference Include="SkiaSharp.Skottie" Version="2.88.2" />
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.6.0-dev.962" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.Material.WinUI" Version="2.4.0-dev.42"/>
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Authentication" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Configuration" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Core" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.Serilog" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive.WinUI" Version="255.255.255.255"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyExtensionsApp\MyExtensionsApp.csproj" />
</ItemGroup>

<Import Project="..\MyExtensionsApp.UI\MyExtensionsApp.UI.projitems" Label="Shared" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup Condition="exists('..\MyExtensionsApp.Windows')">
<EmbeddedResource Include="..\MyExtensionsApp.Windows\Package.appxmanifest" LogicalName="Package.appxmanifest" />
<Content Include="..\MyExtensionsApp.Windows\Images\StoreLogo.png" Link="Assets\StoreLogo.png" />
<Content Include="Assets\Fonts\uno-fluentui-assets.ttf" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Include="..\MyExtensionsApp.UI\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.2" />
<PackageReference Include="SkiaSharp.Skottie" Version="2.88.2" />
<PackageReference Include="Uno.WinUI.Skia.Linux.FrameBuffer" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.6.0-dev.962" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.6.0-dev.962" />
<PackageReference Include="Uno.Material.WinUI" Version="2.4.0-dev.42"/>
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.4.0-dev.99"/>
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Authentication" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Configuration" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Core" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Hosting" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Http.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Localization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Logging.Serilog" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Navigation" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive" Version="255.255.255.255"/>
<PackageReference Include="Uno.Extensions.Reactive.WinUI" Version="255.255.255.255"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyExtensionsApp\MyExtensionsApp.csproj" />
</ItemGroup>

<Import Project="..\MyExtensionsApp.UI\MyExtensionsApp.UI.projitems" Label="Shared" />
</Project>
Loading