Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Enable DIM for GPS packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed May 23, 2023
1 parent 0fae1b6 commit e2a4342
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
<!-- Default TFM's we build for -->
<_DefaultTargetFrameworks>MonoAndroid12.0;net6.0-android</_DefaultTargetFrameworks>

<!-- Enable DIM/SIM for Classic (defaults to true on .NET) -->
<AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>true</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>

<!-- Opt out of C#8 features to maintain compatibility with legacy -->
<AndroidBoundInterfacesContainConstants>false</AndroidBoundInterfacesContainConstants>
<AndroidBoundInterfacesContainTypes>false</AndroidBoundInterfacesContainTypes>
<AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>false</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>

<!-- .NET 6+ generates Resource.designer.cs files for bindings projects which we do not want -->
<AndroidGenerateResourceDesigner>false</AndroidGenerateResourceDesigner>
Expand Down
12 changes: 12 additions & 0 deletions source/GooglePlayServicesProject.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<!-- Include symbol files (*.pdb) in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>

@switch (@Model.NuGetPackageId)
{
case "Xamarin.Google.MLKit.ObjectDetection":
case "Xamarin.Google.MLKit.ObjectDetection.Custom":
case "Xamarin.Google.MLKit.PoseDetection":
case "Xamarin.Google.MLKit.PoseDetection.Accurate":
<!-- Filed as https://github.com/xamarin/java.interop/issues/1116 -->
<AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>false</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>
break;
}

</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit e2a4342

Please sign in to comment.