Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] remove the code that XA0121 deprecates #3857

Merged
merged 1 commit into from
Nov 11, 2019

Commits on Nov 7, 2019

  1. [Xamarin.Android.Build.Tasks] remove the code that XA0121 deprecated

    Context: dotnet#3654
    Context: https://docs.microsoft.com/en-us/xamarin/android/release-notes/10/10.1#xa0121-deprecation-warning-for-old-xamarinandroidsupport-library-versions
    
    In VS 16.4 / Xamarin.Android 10.1, we deprecated
    `<GetAdditionalResourcesFromAssemblies/>`.
    
    This PR removes the behavior completely for 16.5, since it uses SHA1.
    We aim to remove all SHA1 and MD5 usage for 16.5.
    
    NuGet packages I've seen that no longer work:
    
    * Android Support Libraries, 25.x and older
    * Google Play Services older than 44.x
    
    I have still been able to use an old Xamarin.Forms (2.3.4) in
    combination with newer support libraries.
    
    ~~ XA0121 is now an error ~~
    
    We give a build error now in `<FilterAssemblies/>` if we encounter the
    unsupported attributes. This target runs very early in the build, so
    we have to do it at this point.
    
    ~~ JcwGen-Tests ~~
    
    These tests were using these attributes such as:
    
        [assembly: Android.IncludeAndroidResourcesFromAttribute ("./",
            SourceUrl="file:///JavaLib.zip")]
        [assembly: Java.Interop.JavaLibraryReference ("classes.jar",
            SourceUrl="file:///JavaLib.zip")]
        [assembly: Android.NativeLibraryReference ("arm64-v8a/libsimple.so",
            SourceUrl="file:///NativeLib.zip", Version="native-lib-1")]
    
    Instead, I switched to use `@(LibraryProjectZip)` for the `.aar` file
    and `@(EmbeddedNativeLibrary)` for the `.so` files.
    
    ~~ Designer Tests ~~
    
    The designer tests build the MyDriving app:
    
    https://github.com/Azure-Samples/MyDriving
    
    Which uses old NuGet packages that now fail, and is now in read-only
    mode on Github. I suspect we may just need to remove that test?
    
        error XA0121: Assembly 'Xamarin.Android.Support.CustomTabs' is using
            '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported.
            Use a newer version of this NuGet package or notify the library author.
    jonathanpeppers committed Nov 7, 2019
    Configuration menu
    Copy the full SHA
    14922d9 View commit details
    Browse the repository at this point in the history