Skip to content

Commit

Permalink
Merge pull request unoplatform#81 from unoplatform/pj/validation-assets
Browse files Browse the repository at this point in the history
Added validation Tasks
  • Loading branch information
pictos authored Mar 16, 2023
2 parents 8e7fa13 + 039eff2 commit 9321717
Show file tree
Hide file tree
Showing 11 changed files with 426 additions and 169 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android</TargetFrameworks>
<!--<TargetFrameworks>$(TargetFrameworks);net6.0-ios</TargetFrameworks>-->
<!--<TargetFrameworks>$(TargetFrameworks);net6.0-maccatalyst</TargetFrameworks>-->
<TargetFrameworks>$(TargetFrameworks);net6.0-ios</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net6.0-maccatalyst</TargetFrameworks>

<!-- Disabled because of https://github.com/xamarin/xamarin-macios/issues/16401-->
<!--
Expand Down Expand Up @@ -78,4 +78,62 @@
</When>
</Choose>
<Import Project="..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems" Label="Shared" />


<!--Shared-->
<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerImagesNestedPath>$(_UnoIntermediateImages)MyAssets\Nested\dotnet_bot.scale-300.png</_ResizetizerImagesNestedPath>
<_ResizetizerImagesPath>$(_UnoIntermediateImages)Assets\Images\dotnet_bot2.scale-300.png</_ResizetizerImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerImagesNestedPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesPath)')" Text="images file wasn't created." />
</Target>

<!--Android-->
<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'=='net7.0-android'">
<PropertyGroup>
<_ResizetizerSplashScreenDrawablePath>$(_UnoIntermediateSplashScreen)drawable\uno_splash_image.xml</_ResizetizerSplashScreenDrawablePath>
<_ResizetizerColorsPath>$(_UnoIntermediateSplashScreen)values\uno_colors.xml</_ResizetizerColorsPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateImages)splash_screen.scale-150.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateAppIcon)mipmap-anydpi-v26\iconapp.xml</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateAppIcon)mipmap-hdpi\iconapp.png</_ResizetizerAppIconImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerSplashScreenDrawablePath)')" Text="SplashScreen drawable file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerColorsPath)')" Text="Uno_Coloras.xml file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text="iconapp.xml file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
</Target>

<!--iOS-->
<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'=='net7.0-ios' or '$(TargetFramework)'=='net7.0-maccatalyst'">
<PropertyGroup>
<_ResizetizerUnoInfoPlistPath>$(_UnoIntermediateSplashScreen)UnoInfo.plist</_ResizetizerUnoInfoPlistPath>
<_ResizetizerUnoStoryboardPath>$(_UnoIntermediateSplashScreen)UnoSplash.storyboard</_ResizetizerUnoStoryboardPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateImages)splash_screen.scale-400.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconContentsPath>$(_UnoIntermediateImages)Assets.xcassets\iconapp.appiconset\Contents.json</_ResizetizerAppIconContentsPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)Assets.xcassets\iconapp.appiconset\iconapp76x76@2x.png</_ResizetizerAppIconImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerUnoInfoPlistPath)')" Text="UnoInfo.plist file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerUnoStoryboardPath)')" Text="UnoSplash.storyboard file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconContentsPath)')" Text="Contents.json file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
</Target>

<!-- maccatalyst -->
<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'=='net7.0-maccatalyst'">
<PropertyGroup>
<_ResizetizerAppIconContentsPath>$(_UnoIntermediateImages)Assets.xcassets\iconapp.appiconset\Contents.json</_ResizetizerAppIconContentsPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)Assets.xcassets\iconapp.appiconset\iconapp76x76@2x.png</_ResizetizerAppIconImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerAppIconContentsPath)')" Text="Contents.json file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
Expand Down Expand Up @@ -26,4 +26,23 @@
<PackageReference Include="SkiaSharp.Skottie" Version="2.88.3" />
</ItemGroup>
<Import Project="..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems" Label="Shared" />


<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerManifestPath>$(_UnoIntermediateManifest)Package.appxmanifest</_ResizetizerManifestPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateImages)splash_screen.scale-125.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateImages)iconapp.ico</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)iconapp.png</_ResizetizerAppIconImagesPath>
<_ResizetizerImagesNestedPath>$(_UnoIntermediateImages)MyAssets\Nested\dotnet_bot.scale-300.png</_ResizetizerImagesNestedPath>
<_ResizetizerImagesPath>$(_UnoIntermediateImages)Assets\Images\dotnet_bot2.scale-300.png</_ResizetizerImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerManifestPath)')" Text="Manifest file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesNestedPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesPath)')" Text="images file wasn't created." />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,21 @@
<Content Include="Assets\Fonts\uno-fluentui-assets.ttf" />
</ItemGroup>
<Import Project="..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems" Label="Shared" />


<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateImages)splash_screen.scale-125.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateImages)iconapp.ico</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)iconapp.png</_ResizetizerAppIconImagesPath>
<_ResizetizerImagesNestedPath>$(_UnoIntermediateImages)MyAssets\Nested\dotnet_bot.scale-300.png</_ResizetizerImagesNestedPath>
<_ResizetizerImagesPath>$(_UnoIntermediateImages)Assets\Images\dotnet_bot2.scale-300.png</_ResizetizerImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesNestedPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesPath)')" Text="images file wasn't created." />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,25 @@
<PackageReference Include="Uno.WinUI.Lottie" Version="4.7.37" />
</ItemGroup>
<Import Project="..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems" Label="Shared" Condition="Exists('..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems')" />


<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerManifestPath>$(_UnoIntermediateAppManifestWasm)</_ResizetizerManifestPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateImages)splash_screen.scale-300.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateAppIcon)favicon.ico</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateAppIcon)iconapp-128.png</_ResizetizerAppIconImagesPath>
<_ResizetizerUnoManifestJson>$(_UnoIntermediateAppIcon)Unomanifest.webmanifest</_ResizetizerUnoManifestJson>
<_ResizetizerImagesNestedPath>$(_UnoIntermediateImages)MyAssets\Nested\dotnet_bot.scale-300.png</_ResizetizerImagesNestedPath>
<_ResizetizerImagesPath>$(_UnoIntermediateImages)Assets\Images\dotnet_bot2.scale-300.png</_ResizetizerImagesPath>
</PropertyGroup>
<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerUnoManifestJson)')" Text="Unomanifest.json file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesNestedPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerManifestPath)')" Text="Manifest file wasn't created." />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,25 @@
</ItemGroup>

<Import Project="..\Uno.Resizetizer.Sample.Shared\Uno.Resizetizer.Sample.Shared.projitems" Label="Shared" />


<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
<_ResizetizerManifestPath>$(_UnoIntermediateManifest)Package.appxmanifest</_ResizetizerManifestPath>
<_ResizetizerSplashScreenPath>$(_UnoIntermediateSplashScreen)Assets\Images\splash_screenSplashScreen.scale-150.png</_ResizetizerSplashScreenPath>
<_ResizetizerAppIconPath>$(_UnoIntermediateImages)iconapp.ico</_ResizetizerAppIconPath>
<_ResizetizerAppIconImagesPath>$(_UnoIntermediateImages)Images\iconappLogo.scale-150.png</_ResizetizerAppIconImagesPath>
<_ResizetizerImagesNestedPath>$(_UnoIntermediateImages)MyAssets\Nested\dotnet_bot.scale-300.png</_ResizetizerImagesNestedPath>
<_ResizetizerImagesPath>$(_UnoIntermediateImages)Assets\Images\dotnet_bot2.scale-300.png</_ResizetizerImagesPath>
</PropertyGroup>

<Message Text="Validating local assets at '$(_ResizetizerIntermediateOutputRoot)'" Importance="high" />
<Error Condition="!Exists('$(_ResizetizerManifestPath)')" Text="Manifest file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerSplashScreenPath)')" Text="SplashScreen file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesNestedPath)')" Text="images file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerImagesPath)')" Text="images file wasn't created." />
</Target>

</Project>
Loading

0 comments on commit 9321717

Please sign in to comment.