Skip to content

Commit

Permalink
Cleanup and update
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Jan 30, 2022
1 parent 5b0bc13 commit 7384826
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 56 deletions.
15 changes: 8 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
<Version>4.0.0</Version>

<!--<Nullable>enable</Nullable>-->
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;CS0109;CS0108;CS0618;CS0114;NU1603</NoWarn>
<Platform>AnyCPU</Platform>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>

<IsTestProject>$(MSBuildProjectName.Contains('UnitTest'))</IsTestProject>
<IsLibraryProject>$(MSBuildProjectName.Contains('Lottie'))</IsLibraryProject>

Expand Down Expand Up @@ -62,7 +67,7 @@

<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsLibraryProject)' == 'true'">
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -74,19 +79,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Roslynator.Analyzers" Version="3.2.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="AsyncFixer" Version="1.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!--<PackageReference Include="IDisposableAnalyzers" Version="3.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>-->
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PackageReference Include="IDisposableAnalyzers" Version="4.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
<DefineConstants>$(DefineConstants);NETFX_CORE;XAML;WINDOWS;WINDOWS_UWP;UWP</DefineConstants>
<TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.ios'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;APPLE;IOS</DefineConstants>
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/AnimationView.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Reflection;
using System.Windows.Input;
using Xamarin.Forms;
Expand Down
4 changes: 1 addition & 3 deletions Lottie.Forms/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.IO;
using System.Linq;
using System.IO;
using System.Reflection;

namespace Lottie.Forms
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/ILottieComposition.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
namespace Lottie.Forms
namespace Lottie.Forms
{
public interface ILottieComposition : IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion Lottie.Forms/Lottie.Forms.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;xamarin.ios10;xamarin.mac20;monoandroid10.0;tizen40</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">uap10.0.17763;net472;netcoreapp3.1;$(TargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">uap10.0.18362;net472;netcoreapp3.1;$(TargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using Com.Airbnb.Lottie;

namespace Lottie.Forms.Platforms.Android
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/AnimationViewRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.ComponentModel;
using System.ComponentModel;
using Com.Airbnb.Lottie;
using Lottie.Forms;
using Lottie.Forms.Platforms.Android;
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/AnimatorListener.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Android.Animation;
using Android.Animation;
using Android.Runtime;

namespace Lottie.Forms.Platforms.Android
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/AnimatorUpdateListener.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Android.Animation;
using Android.Animation;
using Android.Runtime;

namespace Lottie.Forms.Platforms.Android
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/ClickListener.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Android.Runtime;
using Android.Runtime;
using static Android.Views.View;

namespace Lottie.Forms.Platforms.Android
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Android/LottieFailureListener.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Android.Runtime;
using Android.Runtime;
using Com.Airbnb.Lottie;

namespace Lottie.Forms.Platforms.Android
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Android.Runtime;
using Android.Runtime;
using Com.Airbnb.Lottie;

namespace Lottie.Forms.Platforms.Android
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Ios/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using Airbnb.Lottie;
using Foundation;

Expand Down
7 changes: 3 additions & 4 deletions Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.ComponentModel;
using System.ComponentModel;
using Airbnb.Lottie;
using Foundation;
using Lottie.Forms;
Expand Down Expand Up @@ -192,12 +191,12 @@ private void AnimationCompletionBlock(bool animationFinished)
return;

Element.InvokeFinishedAnimation();

// Can be null depending if the user callback is executed very quickly
// and disposes the Xamarin.Forms page containing the Lottie view
if (_animationView == null || Element == null)
return;

if (Element.RepeatMode == RepeatMode.Infinite)
{
Element.InvokeRepeatAnimation();
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Mac/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using Airbnb.Lottie;
using Foundation;

Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Tizen/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using ElottieSharp;
using Xamarin.Forms.Platform.Tizen;

Expand Down
4 changes: 1 addition & 3 deletions Lottie.Forms/Platforms/Uap/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.IO;
using System.Threading.Tasks;
using System.IO;
using Microsoft.Toolkit.Uwp.UI.Lottie;
using Microsoft.UI.Xaml.Controls;

Expand Down
4 changes: 1 addition & 3 deletions Lottie.Forms/Platforms/Uap/AnimationViewRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.ComponentModel;
using System.Threading.Tasks;
using System.ComponentModel;
using Lottie.Forms;
using Lottie.Forms.Platforms.Uap;
using Microsoft.UI.Xaml.Controls;
Expand Down
3 changes: 1 addition & 2 deletions Lottie.Forms/Platforms/Wpf/AnimationViewExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using LottieSharp;

namespace Lottie.Forms.Platforms.Wpf
Expand Down
6 changes: 2 additions & 4 deletions Samples/Forms/Example.Forms.Droid/Example.Forms.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Build.Download">
<Version>0.10.0</Version>
<Version>0.11.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>4.5.0.657</Version>
<Version>5.0.0.2012</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0" />
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Lottie.Android\Lottie.Android.csproj">
Expand Down
2 changes: 1 addition & 1 deletion Samples/Forms/Example.Forms.Mac/Example.Forms.Mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.5.0.657</Version>
<Version>5.0.0.2012</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/Forms/Example.Forms.iOS/Example.Forms.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.5.0.657</Version>
<Version>5.0.0.2012</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/Native/Example.Droid/Example.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.AppCompat">
<Version>1.1.0</Version>
<Version>1.3.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.0" />
</ItemGroup>
Expand Down

0 comments on commit 7384826

Please sign in to comment.