xamarin / AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
MIT License
146 stars 56 forks source link

AndroidX: Find hooks into existin X.A targets to run Jetifier #146

Closed Redth closed 5 years ago

Redth commented 5 years ago

Once we can actually invoke Jetifier we'll need to figure out where the appropriate place to 'hook' into the Xamarin.Android msbuild targets is to run Jetifier at.

We have two options for when we Jetify:

  1. First generate ACW and compile against legacy android support jar’s, and run jetifier on everything afterwards (no need to rewrite JNI strings in Register attribute in this scenario)
  2. Compile against new androidx .jar’s and jetify them before ACW generation and compilation (need to rewrite JNI strings in Register attribute)

We are heavily leaning towards option 2. This will require working with probably @dellis1972 and/or @jonathanpeppers to determine the appropriate ItemGroup the .jar files are in which need to be processed, and which targets are best to run this task after/before.

One thing to watch out for here is we may need to keep a black list of android support .jar's that could end up in our item group even though we shouldn't jetify them.

VS bug #773869

Redth commented 5 years ago

@jonpryor when talking about Option 2 here, do we actually do any javac compilation against any .jar's before the ACW generation?