Previously, our template would create bindings using <InputJar>, then manually add the jar/aar and any Proguard files to the .nupgk, and then use a .targets file to add these payloads to the Android application.
This was likely done for 2 reasons:
Better build performance by not needing to extract an embedded .jar/.aar.
Poor initial support for the other files contained in .aar files. (Proguard, etc.)
In .NET times, both of these issues have been resolved, and we can replace our custom hacks with the built-in <AndroidLibrary> build item, reducing the maintenance burden of custom solutions.
Note there is an issue with resources if the name of the included .aar is different from what our previous package versions named it:
error APT2260: resource style/TextAppearance.Compat.Notification.Info (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Info) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Info (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Info) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Info (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Info) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Time (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Time) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Time (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Time) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Time (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Time) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Title (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Title) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Title (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Title) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2260: resource style/TextAppearance.Compat.Notification.Title (aka com.companyname.BuildAllDotNet:style/TextAppearance.Compat.Notification.Title) not found. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
error APT2062: failed linking references. [/Users/runner/work/1/s/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj]
I was unable to find the root cause of this, so I added a workaround to rename the Java library the same as we previously used. (@(art.MavenGroupId).@(art.MavenArtifactId).[jar|aar])
Previously, our template would create bindings using
<InputJar>
, then manually add thejar
/aar
and any Proguard files to the.nupgk
, and then use a.targets
file to add these payloads to the Android application.This was likely done for 2 reasons:
.jar
/.aar
..aar
files. (Proguard, etc.)In .NET times, both of these issues have been resolved, and we can replace our custom hacks with the built-in
<AndroidLibrary>
build item, reducing the maintenance burden of custom solutions.Note there is an issue with resources if the name of the included
.aar
is different from what our previous package versions named it:I was unable to find the root cause of this, so I added a workaround to rename the Java library the same as we previously used. (
@(art.MavenGroupId).@(art.MavenArtifactId).[jar|aar]
)