Skip to content

Commit

Permalink
feat: Uno.UI.GooglePlay
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Sep 18, 2024
1 parent 4bb5ae0 commit 61041ae
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 1 deletion.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<NetCurrentWpf>$(NetCurrent)-windows</NetCurrentWpf>

<NetMobilePreviousAndCurrent>$(NetPreviousNetCoreMobile);$(NetCurrentNetCoreMobile)</NetMobilePreviousAndCurrent>
<NetAndroidPreviousAndCurrent>$(NetPrevious)-android;$(NetCurrent)-android</NetAndroidPreviousAndCurrent>
<NetWpfPreviousAndCurrent>$(NetPreviousWpf);$(NetCurrentWpf)</NetWpfPreviousAndCurrent>
<NetWasmPreviousAndCurrent>$(NetPrevious);$(NetCurrent)</NetWasmPreviousAndCurrent>
<NetSkiaPreviousAndCurrent>$(NetPrevious);$(NetCurrent)</NetSkiaPreviousAndCurrent>
Expand Down
7 changes: 7 additions & 0 deletions src/AddIns/Uno.UI.GooglePlay/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System.Reflection;
using Uno.Foundation.Extensibility;
using Uno.UI.Xaml.Media.Imaging.Svg;

[assembly: AssemblyMetadata("IsTrimmable", "True")]

[assembly: ApiExtension(typeof(IInAppReviewExtension), typeof(InAppReviewExtension))]
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetAndroidPreviousAndCurrent)</TargetFrameworks>
</PropertyGroup>

<Import Project="../../targetframework-override.props" />

<PropertyGroup>
<NoWarn>$(NoWarn);Uno0001</NoWarn>
<Deterministic>true</Deterministic>
<Nullable>enable</Nullable>
<AssemblyName>Uno.UI.GooglePlay</AssemblyName>
<RootNamespace>Uno.UI.GooglePlay</RootNamespace>

<DefineConstants Condition="'$(UNO_UWP_BUILD)'!='true'">$(DefineConstants);HAS_SKOTTIE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Remove="buildTransitive\*.GooglePlay.targets" />
</ItemGroup>

<ItemGroup>
<Content Include="buildTransitive\*.GooglePlay.targets">
<PackagePath>build</PackagePath>
<Pack>true</Pack>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Uno.UI\Uno.UI.netcoremobile.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />

<PackageReference Include="SkiaSharp.Skottie" />

<PackageReference Include="SkiaSharp.Views.Uno" Condition="'$(UNO_UWP_BUILD)'=='true'" />
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" Condition="'$(UNO_UWP_BUILD)'!='true'" />

<!-- Explicitly included to remove all assets from Uno dependencies coming from SkiaSharp.Views.* -->
<PackageReference Include="Uno.UI" Version="4.4.5" ExcludeAssets="all" IncludeAssets="none" PrivateAssets="all" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<PackageReference Include="Uno.WinUI" Version="4.4.5" ExcludeAssets="all" IncludeAssets="none" PrivateAssets="all" Condition="'$(UNO_UWP_BUILD)'!='true'" />
</ItemGroup>

<Import Project="..\..\SourceGenerators\Uno.UI.SourceGenerators\Content\Uno.UI.SourceGenerators.props" />

<Target Name="_CleanupReferences" BeforeTargets="CoreCompile">
<!-- Required when building under VS to remove analyzer references coming from the Uno.UI/Uno.WinUI transitive references -->
<ItemGroup>
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.NugetPackageId)'=='Uno.UI'"/>
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.NugetPackageId)'=='Uno.WinUI'"/>
</ItemGroup>
</Target>

<Target Name="_UnoToolkitOverrideNuget" AfterTargets="AfterBuild" DependsOnTargets="BuiltProjectOutputGroup" Condition="'$(UnoNugetOverrideVersion)'!=''">

<PropertyGroup>
<_OverrideTargetFramework>$(TargetFramework)</_OverrideTargetFramework>

<!-- Current nuget publishing uses netX.0-android30.0 -->
<_OverrideTargetFramework Condition="$(_OverrideTargetFramework.EndsWith('.0-android'))">$(_OverrideTargetFramework)30.0</_OverrideTargetFramework>

<_TargetNugetFolder>$(NuGetPackageRoot)\uno.ui.GooglePlay\$(UnoNugetOverrideVersion)\lib\$(_OverrideTargetFramework)</_TargetNugetFolder>
</PropertyGroup>
<ItemGroup>
<_OutputFiles Include="$(TargetDir)**" />
</ItemGroup>
<MakeDir Directories="$(_TargetNugetFolder)" />

<Message Importance="high" Text="OVERRIDING NUGET PACKAGE CACHE: $(_TargetNugetFolder)" />

<Copy SourceFiles="@(_OutputFiles)" DestinationFiles="@(_OutputFiles->'$(_TargetNugetFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(_OutputFilesPDB)" DestinationFiles="@(_OutputFilesPDB->'$(_TargetNugetFolder)\%(RecursiveDir)%(Filename).pdb')" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup>
<UnoRuntimeEnabledPackage Include="Uno.UI.GooglePlay" PackageBasePath="$(MSBuildThisFileDirectory)" Condition="'$(MSBuildThisFile)'=='uno.ui.googleplay.targets'" />
<UnoRuntimeEnabledPackage Include="Uno.WinUI.GooglePlay" PackageBasePath="$(MSBuildThisFileDirectory)" Condition="'$(MSBuildThisFile)'=='uno.winui.googleplay.targets'" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetPrevious)-android;$(NetCurrent)-android</TargetFrameworks>
<TargetFrameworks>$(NetAndroidPreviousAndCurrent)</TargetFrameworks>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;1705;109</NoWarn>
Expand Down

0 comments on commit 61041ae

Please sign in to comment.