Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Build tasks and tools to support Xamarin.Android AndroidX migration

License

Notifications You must be signed in to change notification settings

yinyue200/XamarinAndroidXMigration

 
 

Repository files navigation

Xamarin AndroidX Migration

Build Status Build Status

If you are looking for the source code to the Xamarin AndroidX bindings, it is available in the branch: AndroidX @ xamarin/AndroidSupportComponents

The Migration package helps apps which are transitioning to AndroidX but haven't yet updated their own source code to the new AndroidX API's, or still depend on third party libraries which have not been updated to use the new AndroidX API's.

Building the Xamarin.AndroidX.Migration NuGet package

The packages are built using Cake, which is very simple to use. All you need is the .NET Core tool: Cake.Tool

Installing the tool:

dotnet tool install --global Cake.Tool --version 0.34.1

Starting the build:

dotnet cake

Add the Xamarin.AndroidX.Migration NuGet package to your app

You should add the Xamarin.AndroidX.Migration NuGet package to your Xamarin Android application project and any Xamarin.Android library projects it references.

Keep the Xamarin.Android.Support.* NuGet packages

You will need to keep your existing references to Xamarin.Android.Support.* NuGet packages as any remaining usage of the old Android Support API's will require this for compiling before the migration build step does its job. The Android Support libraries will not be bundled into your apk.

Add references to the correct AndroidX NuGet packages

The migration package contains a validation step which helps ensure you have references to all of the AndroidX NuGet packages that the Android Support library NuGet packages you reference in your app map to.

You will see a build error generated telling you which packages are missing which you need to add.

When can I remove the Migration package?

As soon as all of your own source code, layout files, proguard configurations, and manifest files are converted over to using the new AndroidX API's, and all of the libraries you depend on have done the same, you can safely remove the AndroidX Migration NuGet package along with all of the old Android Support library NuGet packages.

Current Limitations or known issues

  • Android Designer may become unusable after adding AndroidX Migration package

About

Build tasks and tools to support Xamarin.Android AndroidX migration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 91.7%
  • Java 7.7%
  • PowerShell 0.6%