wordpress-mobile / WordPress-Login-Flow-Android

Pluggable WordPress login flow for Android
GNU General Public License v2.0
14 stars 3 forks source link

Android x migration #19

Closed malinajirka closed 4 years ago

malinajirka commented 4 years ago

This PR replaces SupportLibrary with AndroidX.

I simply used the AS migration tool. The only thing I had to do manually was adding androidx namespace to Checkstyle.xml + Project.xml and reorder the imports.

Merge instructions (please cross off completed steps)

  1. Wait until https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/18 is merged
  2. ~Wait until https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/17 is merged.~
  3. Merge develop into master-android-x
  4. Update the target branch of this PR to master-android-x
  5. Test the library in either WPAndroid or WCAndroid - whichever is migrated to AndroidX first. (for WPAndroid git subtree pull --prefix=libs/login git@github.com:wordpress-mobile/WordPress-Login-Flow-Android.git master-android-x --squash)
  6. Merge this PR
  7. Create a new PR for master-android-x to develop which can be merge when both WPAndroid and WCAndroid are migrated to AndroidX
malinajirka commented 4 years ago

This build is failing due to two reasons

  1. We need to update Dagger's version
  2. We need to add android.useAndroidX=true, android.enableJetifier=true properties into 'gradle.properties' on CircleCI I've tried to assemble an apk after making these changes in it worked as expected.

I'm closing this PR as I think it makes more sense if we perform the migration in the app repo and push the changes here.

Feel free to re-open it if you think we should rather merge the changes here.

aforcier commented 4 years ago

@malinajirka that makes sense.

Do 'the app repo', do you mean WooAndroid or WPAndroid? IIRC the original plan was to do libraries -> WooAndroid -> WPAndroid, so if we want to make the subtree changes inside an app it might work out better to do it from WooAndroid. But as long as a feature branch is used in this repo it's probably fine.

Also, there was an issue updating to Gradle plugin 3.3.+: https://github.com/wordpress-mobile/WordPress-Android/issues/9436. The big blocker was Fabric, which now should be fine as we dropped it, but there was also an issue with the bintray release plugin. I see a version 0.9.1 was recently released, that may have resolved the issue.

malinajirka commented 4 years ago

Do 'the app repo', do you mean WooAndroid or WPAndroid? IIRC the original plan was to do libraries -> WooAndroid -> WPAndroid, so if we want to make the subtree changes inside an app it might work out better to do it from WooAndroid. But as long as a feature branch is used in this repo it's probably fine.

I meant whichever is migrated first:P. But it makes sense to proceed with WooAndroid migration first.

I see a version 0.9.1 was recently released, that may have resolved the issue.

Good point. I'll make sure to test it.