Skip to content

Commit f9c2fab

Browse files
authored
Added nuspec file to package both uap and net9 targeted uwp libraries together (#575)
* Added nuspec file to package both uap and net9 targeted uwp libraries together * Fixed relative dir path * Fix package name * Fixed structure of the package * fixes
1 parent 56dcfb8 commit f9c2fab

File tree

5 files changed

+73
-2
lines changed

5 files changed

+73
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,7 @@ msbuild.binlog
234234
LottieGenOutput-*/
235235

236236
# Visual Studio debugging configuration file.
237-
launchSettings.json
237+
launchSettings.json
238+
239+
# Nuget Package files.
240+
pack/

Lottie-Windows/Lottie-Windows-WinUI3/Lottie-Windows-WinUI3.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<AssemblyName>CommunityToolkit.WinUI.Lottie</AssemblyName>
99
<PackageId>CommunityToolkit.WinUI.Lottie</PackageId>
1010
<PackageTags>WinUI3 Toolkit Windows Animations Lottie XAML</PackageTags>
11+
<IsPackable>True</IsPackable>
1112

1213
<Nullable>enable</Nullable>
1314
<CsWinRTIncludes>Microsoft</CsWinRTIncludes>

Lottie-Windows/Lottie-Windows.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
<!-- Nuget props-->
88
<Description>This library provides the LottieVisualSource which is consumed by the Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer to render Lottie JSON files.</Description>
9-
<IsPackable>True</IsPackable>
109

1110
<LangVersion>latest</LangVersion>
1211
<DocumentationFile>bin\AnyCPU\Release\CommunityToolkit.WinUI.Lottie.xml</DocumentationFile>

build/Lottie-Windows-Uwp.nuspec

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>CommunityToolkit.Uwp.Lottie</id>
5+
<version>0.0.0-SpecifyVersionOnCommandline</version>
6+
<authors>Microsoft.Toolkit</authors>
7+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
8+
<licenseUrl>https://github.com/windows-toolkit/Lottie-Windows/blob/master/license.md</licenseUrl>
9+
<projectUrl>https://github.com/windows-toolkit/Lottie-Windows</projectUrl>
10+
<iconUrl>https://raw.githubusercontent.com/windows-toolkit/WindowsCommunityToolkit/master/build/nuget.png</iconUrl>
11+
<description>This library provides the LottieVisualSource which is consumed by the Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer to render Lottie JSON files in runtime.</description>
12+
<releaseNotes>Release https://github.com/windows-toolkit/Lottie-Windows/releases</releaseNotes>
13+
<copyright>(c) .NET Foundation and Contributors. All rights reserved.</copyright>
14+
<tags>UWP Toolkit Windows Animations Lottie XAML</tags>
15+
<dependencies>
16+
<group targetFramework="net9.0-windows10.0.26100">
17+
<dependency id="Microsoft.UI.Xaml" version="2.8.7" />
18+
<dependency id="Microsoft.Windows.CsWinRT" version="2.2.0" />
19+
<dependency id="Win2D.uwp" version="1.28.2" />
20+
</group>
21+
<group targetFramework="uap10.0.16299">
22+
<dependency id="Microsoft.UI.Xaml" version="2.5.0" exclude="Build,Analyzers" />
23+
<dependency id="Win2D.uwp" version="1.25.0" exclude="Build,Analyzers" />
24+
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
25+
<dependency id="System.Numerics.Vectors" version="4.5.0" exclude="Build,Analyzers" />
26+
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" exclude="Build,Analyzers" />
27+
<dependency id="System.Text.Encodings.Web" version="9.0.0" exclude="Build,Analyzers" />
28+
<dependency id="System.Text.Json" version="9.0.0" exclude="Build,Analyzers" />
29+
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
30+
</group>
31+
</dependencies>
32+
<frameworkReferences>
33+
<group targetFramework="net9.0-windows10.0.26100">
34+
<frameworkReference name="Microsoft.Windows.SDK.NET.Ref.Xaml" />
35+
</group>
36+
</frameworkReferences>
37+
</metadata>
38+
39+
<files>
40+
<file src="pack\lib\net9.0-windows10.0.26100.0\CommunityToolkit.Uwp.Lottie.dll"
41+
target="lib\net9.0-windows10.0.26100\" />
42+
<file src="pack\lib\net9.0-windows10.0.26100.0\CommunityToolkit.WinUI.Lottie.xml"
43+
target="lib\net9.0-windows10.0.26100\" />
44+
<file src="pack\lib\net9.0-windows10.0.26100.0\CommunityToolkit.Uwp.Lottie.pri"
45+
target="lib\net9.0-windows10.0.26100\" />
46+
47+
<file src="pack\lib\uap10.0.16299\CommunityToolkit.WinUI.Lottie.winmd"
48+
target="lib\uap10.0.16299\" />
49+
<file src="pack\lib\uap10.0.16299\CommunityToolkit.WinUI.Lottie.pri"
50+
target="lib\uap10.0.16299\" />
51+
<file src="pack\lib\uap10.0.16299\CommunityToolkit.WinUI.Lottie.xml"
52+
target="lib\uap10.0.16299\" />
53+
</files>
54+
</package>

build/build.cake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,20 @@ Task("Package")
244244
// Invoke the pack target to generate the code to be packed.
245245
MSBuildSolution("Pack", ("GenerateLibraryLayout", "true"), ("PackageOutputPath", nupkgDir));
246246

247+
var stage = Directory($"{buildDir}/pack/lib");
248+
249+
var net9Dir = stage + Directory("net9.0-windows10.0.26100.0");
250+
var uapDir = stage + Directory("uap10.0.16299");
251+
252+
// clean & recreate
253+
CleanDirectory(stage);
254+
EnsureDirectoryExists(net9Dir);
255+
EnsureDirectoryExists(uapDir);
256+
257+
// copy the Release builds
258+
CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-UwpNet/bin/AnyCPU/{configuration}/net9.0-windows10.0.26100.0/*", net9Dir);
259+
CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/AnyCPU/{configuration}/uap10.0.16299/*", uapDir);
260+
247261
foreach (var nuspec in GetFiles("./*.nuspec"))
248262
{
249263
var nuGetPackSettings = new NuGetPackSettings

0 commit comments

Comments
 (0)