Skip to content

Updated Cake build system to newer version, and updated source to net7.0. #530

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

Merged
merged 2 commits into from
Apr 19, 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
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "3.0.0",
"commands": [
"dotnet-cake"
]
}
}
}
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<Choose>
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.5.132" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />

<!-- <EmbeddedResource Include="**\*.rd.xml" />
Expand All @@ -145,7 +145,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version=" 2.1.65" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions Lottie-Windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -548,26 +548,26 @@ Global
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.BETA|x64.Build.0 = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.BETA|x86.ActiveCfg = Debug|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.BETA|x86.Build.0 = Debug|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|Any CPU.ActiveCfg = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|Any CPU.Build.0 = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|ARM.ActiveCfg = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|ARM.Build.0 = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|ARM64.ActiveCfg = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|ARM64.Build.0 = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x64.ActiveCfg = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x64.Build.0 = Debug|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x86.ActiveCfg = Debug|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x86.Build.0 = Debug|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|Any CPU.ActiveCfg = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|Any CPU.Build.0 = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x86.ActiveCfg = Debug|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Debug|x86.Build.0 = Debug|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|Any CPU.Build.0 = Release|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|ARM.ActiveCfg = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|ARM.Build.0 = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|ARM64.ActiveCfg = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|ARM64.Build.0 = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x64.ActiveCfg = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x64.Build.0 = Release|x64
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x86.ActiveCfg = Release|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x86.Build.0 = Release|x86
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x86.ActiveCfg = Release|Any CPU
{C505CD2D-5D26-42EE-8FAA-41BB784821EF}.Release|x86.Build.0 = Release|Any CPU
{6AB50ED0-6273-4919-9ADE-50195664EF15}.BETA|Any CPU.ActiveCfg = Debug|x64
{6AB50ED0-6273-4919-9ADE-50195664EF15}.BETA|Any CPU.Build.0 = Debug|x64
{6AB50ED0-6273-4919-9ADE-50195664EF15}.BETA|Any CPU.Deploy.0 = Debug|x64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageReference Include="System.Numerics.Vectors">
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />
<PackageReference Include="System.Text.Json" Version="5.0.1" />
<PackageReference Include="System.ValueTuple">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows10.0.18362.0</TargetFramework>
<TargetFramework>net7.0-windows10.0.18362.0</TargetFramework>
<OutputType>Library</OutputType>

<PackageId>CommunityToolkit.WinUI.Lottie</PackageId>
<PackageTags>WinUI3 Toolkit Windows Animations Lottie XAML</PackageTags>

<Nullable>enable</Nullable>
<CsWinRTIncludes>Microsoft</CsWinRTIncludes>
<Platforms>x64;x86</Platforms>
<DefineConstants>WINAPPSDK</DefineConstants>
<SignAssembly>True</SignAssembly>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.30" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.3" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.4" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
</ItemGroup>

<Import Project="..\Lottie-Windows.props" />
Expand Down
2 changes: 1 addition & 1 deletion LottieGen/Common.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup Label="Configuration">
<Import_RootNamespace>LottieGen</Import_RootNamespace>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LottieGen</RootNamespace>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
Expand Down
4 changes: 2 additions & 2 deletions LottieGen/MSBuildTask/LottieGen.MsBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.9.0" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.5.0" />
</ItemGroup>

<!--
Expand Down Expand Up @@ -58,7 +58,7 @@
</packageTypes>
</metadata>
<files>
<file src="]]>$([MsBuild]::NormalizePath('$(MsBuildThisFileDirectory)..\win-x64\bin\AnyCPU\$(Configuration)\net5.0\win-x64\publish\LottieGen.exe'))<![CDATA[" target="bin" />
<file src="]]>$([MsBuild]::NormalizePath('$(MsBuildThisFileDirectory)..\win-x64\bin\AnyCPU\$(Configuration)\net7.0\win-x64\publish\LottieGen.exe'))<![CDATA[" target="bin" />
<file src="]]>$(MsBuildThisFileDirectory)$(_LottieGenNuspecPropsFile)<![CDATA[" target="build/native/" />
<file src="]]>$(MsBuildThisFileDirectory)$(_LottieGenNuspecPropsFile)<![CDATA[" target="build/win/" />
<file src="]]>$([MsBuild]::NormalizePath('$(MsBuildThisFileDirectory)..\MSBuildTask\bin\AnyCPU\$(Configuration)\net472\$(AssemblyName).dll'))<![CDATA[" target="bin/" />
Expand Down
8 changes: 4 additions & 4 deletions LottieGen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

LottieGen is a tool for generating C#, C++, and other outputs from Lottie / Bodymovin JSON files. LottieGen is built as a [.NET global tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools), which means it will run anywhere .NET Core is available, including Linux and Mac.

LottieGen requires [.NET Core 5.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/5.0) or later.
LottieGen requires [.NET Core 7.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/7.0) or later.

# Run without installation

Local builds can be run directly. Just install [.NET Core 5.0](https://dotnet.microsoft.com/download/dotnet-core/5.0), build the LottieGen.sln solution and run the output.
Local builds can be run directly. Just install [.NET Core 7.0](https://dotnet.microsoft.com/download/dotnet-core/7.0), build the LottieGen.sln solution and run the output.

f:\GitHub\Lottie-Windows\LottieGen\DotnetTool\bin\AnyCpu\Debug\net5.0\lottiegen.exe
f:\GitHub\Lottie-Windows\LottieGen\DotnetTool\bin\AnyCpu\Debug\net7.0\lottiegen.exe

And of course you can copy LottieGen to a directory and run directly without installing it, for example:

copy f:\GitHub\Lottie-Windows\LottieGen\DotnetTool\bin\AnyCpu\Debug\net5.0\* d:\mybuildtools
copy f:\GitHub\Lottie-Windows\LottieGen\DotnetTool\bin\AnyCpu\Debug\net7.0\* d:\mybuildtools


# Install as a .NET Core global tool
Expand Down
2 changes: 1 addition & 1 deletion LottieViewer/LottieViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<Version>4.5.4</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
<Version>5.0.0</Version>
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>5.0.1</Version>
Expand Down
19 changes: 6 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pr:
- rel/*

pool:
vmImage: windows-2019
vmImage: windows-2022

variables:
BuildConfiguration: Lottie-Windows
Expand All @@ -20,15 +20,15 @@ steps:
- task: BatchScript@1
displayName: Setup Environment Variables
inputs:
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
filename: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
arguments: -no_logo
modifyEnvironment: true

# Install NuGet tools.
- task: NuGetToolInstaller@1
displayName: Use NuGet 5.8.1
displayName: Use NuGet 6.5.0
inputs:
versionSpec: 5.8.1
versionSpec: 6.5.0

# Install Nerbank.GitVersioning.
- task: DotNetCoreCLI@2
Expand All @@ -39,17 +39,10 @@ steps:
arguments: install --tool-path . nbgv

# .NET Core SDK Installer.
# 2.2.x is needed to build the UWP code.
# 5.0.x is used for everything else that the UWP apps don't depend on.
- task: UseDotNet@2
inputs:
packageType: 'sdk' # Options: runtime, sdk
version: '2.2.x'

- task: UseDotNet@2
inputs:
packageType: 'sdk' # Options: runtime, sdk
version: '5.0.x'
version: '7.0.x'

# Nerdbank.GitVersioning
- script: nbgv cloud
Expand All @@ -61,7 +54,7 @@ steps:
displayName: Insider SDK

# Run the build.
- powershell: .\build.ps1 -target=Package
- powershell: .\build.ps1 --target=Package
displayName: Build
workingDirectory: .\build

Expand Down
22 changes: 3 additions & 19 deletions build/build.cake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#module "Cake.Longpath.Module"

#addin nuget:?package=Cake.FileHelpers&version=3.2.1
#addin nuget:?package=Cake.Powershell&version=0.4.8
#addin nuget:?package=Cake.FileHelpers&version=6.1.3
#addin nuget:?package=Cake.GitVersioning&version=3.5.119

using System;
using System.Linq;
Expand All @@ -18,7 +16,6 @@ var configuration = Argument("configuration", "Release");
// VERSIONS OF TOOLS TO USE
//////////////////////////////////////////////////////////////////////

var gitVersioningVersion = "3.0.28";
var inheritDocVersion = "2.3.0";

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -178,28 +175,15 @@ Task("Verify")
{
// Source code needs to have appropriate licensing headers.
VerifyHeaders(false);

// SDK needs to be installed.
StartPowershellFile("./Find-WindowsSDKVersions.ps1");
});

Task("Version")
.Description("Updates the version information in all Projects")
.IsDependentOn("Verify")
.Does(() =>
{
Information("\r\nDownloading NerdBank GitVersioning...");
var installSettings = new NuGetInstallSettings {
ExcludeVersion = true,
Version = gitVersioningVersion,
OutputDirectory = toolsDir
};

NuGetInstall(new []{"nerdbank.gitversioning"}, installSettings);

Information("\r\nRetrieving version...");
var results = StartPowershellFile(versionClient);
Version = results[1].Properties["NuGetPackageVersion"].Value.ToString();
Version = GitVersioningGetVersion().NuGetPackageVersion;
Information($"\r\nBuild Version: {Version}");
});

Expand Down
Loading