In all of the examples we used when developing and testing @(AndroidMavenLibrary) the Maven artifact filename followed the pattern {artifact.Id}-{artifact.Version}.[jar|aar], so this is the default filename we construct for the user.
However, there exists some packages like React that do not follow this pattern and instead do eg: react-android-0.76.0-release.aar. Attempting to use @(AndroidMavenLibrary) for React produces the following error:
error XA4236: Cannot download Maven artifact 'com.facebook.react:react-android'.
error XA4236: - react-android-0.76.0.jar: Response status code does not indicate success: 404 (Not Found).
error XA4236: - react-android-0.76.0.aar: Response status code does not indicate success: 404 (Not Found).
To support these cases, add a new optional metadata ArtifactFilename that can be specified to override the Maven filename of the artifact.
Fixes: https://github.com/dotnet/android/issues/9465
In all of the examples we used when developing and testing
@(AndroidMavenLibrary)
the Maven artifact filename followed the pattern{artifact.Id}-{artifact.Version}.[jar|aar]
, so this is the default filename we construct for the user.However, there exists some packages like React that do not follow this pattern and instead do eg:
react-android-0.76.0-release.aar
. Attempting to use@(AndroidMavenLibrary)
for React produces the following error:To support these cases, add a new optional metadata
ArtifactFilename
that can be specified to override the Maven filename of the artifact.This allows our tasks to properly download the artifact and avoid the error.