Skip to content

Commit

Permalink
fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
kfrancis committed May 30, 2024
1 parent 4ea226d commit dcd784f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 45 deletions.
66 changes: 31 additions & 35 deletions src/Plugin.Maui.OCR/Plugin.Maui.OCR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,80 +71,76 @@
</PropertyGroup>
<!-- iOS & MacCatalyst -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net')) == true AND $(TargetFramework.Contains('-ios')) != true AND $(TargetFramework.Contains('-maccatalyst')) != true ">
<Compile Remove="**\*.ios.cs" />
<None Include="**\*.ios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\ios\**\*.cs" />
<None Include="**\ios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\*.macios.cs" />
<None Include="**\*.macios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\macios\**\*.cs" />
<None Include="**\macios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\*.ios.cs"/>
<None Include="**\*.ios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<Compile Remove="**\ios\**\*.cs"/>
<None Include="**\ios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<Compile Remove="**\*.macios.cs"/>
<None Include="**\*.macios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<Compile Remove="**\macios\**\*.cs"/>
<None Include="**\macios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
</ItemGroup>
<!-- Android -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net')) == true AND $(TargetFramework.Contains('-android')) != true">
<Compile Remove="**\*.android.cs" />
<None Include="**\*.android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\android\**\*.cs" />
<None Include="**\android\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\*.android.cs"/>
<None Include="**\*.android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<Compile Remove="**\android\**\*.cs"/>
<None Include="**\android\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
</ItemGroup>
<!-- Windows -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net')) == true AND $(TargetFramework.Contains('-windows')) != true">
<Compile Remove="**\*.windows.cs" />
<None Include="**\*.windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\windows\**\*.cs" />
<None Include="**\windows\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\*.windows.cs"/>
<None Include="**\*.windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<Compile Remove="**\windows\**\*.cs"/>
<None Include="**\windows\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
</ItemGroup>
<!-- .NET (generic) -->
<ItemGroup Condition="!($(TargetFramework.StartsWith('net')) == true AND $(TargetFramework.EndsWith('.0')) == true AND $(TargetFramework.Contains('-')) != true)">
<!-- e.g net6.0 or net8.0 (and higher) -->
<Compile Remove="**\*.net.cs" />
<None Include="**\*.net.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\*.net.cs"/>
<None Include="**\*.net.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
<PackageReference Include="MinVer" Version="5.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Management" Version="8.0.0" Condition="$(TargetFramework.Contains('-windows')) == true" />
<PackageReference Include="System.Management" Version="8.0.0" Condition="$(TargetFramework.Contains('-windows')) == true"/>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.3.2" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"/>
<PackageReference Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.3.2" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"/>
<PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.3.2" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />
<PackageReference Include="Xamarin.Google.MLKit.TextRecognition" Version="116.0.0.6" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"/>
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.6.2.2" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"/>
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="( '$(TargetFramework)' == 'net8.0-android' )">
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.3.2">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.3.2">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.3.2">
</PackageReference>
<PackageReference Include="Xamarin.Google.MLKit.TextRecognition" Version="116.0.0.6" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
</ItemGroup>
<!-- Package additions -->
<ItemGroup>
<None Include="..\..\nuget.png" PackagePath="icon.png" Pack="true" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<None Include="..\..\nuget.png" PackagePath="icon.png" Pack="true"/>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<!-- Filter out unnecessary files -->
<_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')-&gt;WithMetadataValue('PrivateAssets', 'All'))" />
<_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')-&gt;WithMetadataValue('PrivateAssets', 'All'))"/>
</ItemGroup>
<!-- Print batches for debug purposes -->
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''"/>
<ItemGroup>
<!-- Add file to package with consideration of sub folder. If empty, the root folder is chosen. -->
<BuildOutputInPackage Include="@(_ReferenceCopyLocalPaths)" TargetPath="%(_ReferenceCopyLocalPaths.DestinationSubDirectory)" />
<BuildOutputInPackage Include="@(_ReferenceCopyLocalPaths)" TargetPath="%(_ReferenceCopyLocalPaths.DestinationSubDirectory)"/>
</ItemGroup>
</Target>
</Project>
23 changes: 13 additions & 10 deletions src/Plugin.Xamarin.OCR/Plugin.Xamarin.OCR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
</PropertyGroup>
<!-- Package additions -->
<ItemGroup>
<Compile Include="*.cs" />
<None Include="..\..\README.md" Pack="true" PackagePath="." />
<Compile Include="*.cs"/>
<None Include="..\..\README.md" Pack="true" PackagePath="."/>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -42,25 +42,25 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
<Compile Include="netstandard\*.cs" />
<Compile Include="netstandard\*.cs"/>
</ItemGroup>
<!-- iOS -->
<ItemGroup Condition=" $(TargetFramework.StartsWith('Xamarin.iOS')) ">
<Compile Include="Platforms\Apple\**\*.cs" />
<Compile Include="Platforms\Apple\**\*.cs"/>
</ItemGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('Xamarin.iOS')) ">
<DefineConstants>$(DefineConstants);IOS;</DefineConstants>
</PropertyGroup>
<!-- macOS -->
<ItemGroup Condition=" $(TargetFramework.StartsWith('Xamarin.Mac')) ">
<Compile Include="Platforms\Apple\**\*.cs" />
<Compile Include="Platforms\Apple\**\*.cs"/>
</ItemGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('Xamarin.Mac')) ">
<DefineConstants>$(DefineConstants);MACOS;</DefineConstants>
</PropertyGroup>
<!-- Android -->
<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<Compile Include="Platforms\Android\**\*.cs" />
<Compile Include="Platforms\Android\**\*.cs"/>
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.3.0">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.3.0">
Expand All @@ -72,20 +72,23 @@
<PackageReference Include="Xamarin.Google.MLKit.TextRecognition">
<Version>116.0.0.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx">
<Version>1.6.2.2</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<DefineConstants>$(DefineConstants);ANDROID;</DefineConstants>
</PropertyGroup>
<!-- UWP -->
<ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<Compile Include="Platforms\UWP\**\*.cs" />
<Compile Include="Platforms\UWP\**\*.cs"/>
</ItemGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<!--<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>-->
<DefineConstants>$(DefineConstants);WINDOWS_UWP;</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) OR $(TargetFramework.StartsWith('Xamarin.TVOS')) OR $(TargetFramework.StartsWith('Xamarin.WatchOS')) OR $(TargetFramework.StartsWith('Tizen')) ">
<Compile Include="Platforms\NotImplemented\**\*.cs" />
<Compile Include="Platforms\NotImplemented\**\*.cs"/>
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.3">
Expand All @@ -94,9 +97,9 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="Abstractions\IOcrService.cs" />
<None Remove="Abstractions\IOcrService.cs"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Abstractions\IOcrService.cs" />
<Compile Include="Abstractions\IOcrService.cs"/>
</ItemGroup>
</Project>

0 comments on commit dcd784f

Please sign in to comment.