davidschreiber edited a comment on issue #565: androidx URL: https://github.com/apache/cordova-android/issues/565#issuecomment-454891636 Hi there 👋I'd like to better understand the current schedule for the AndroidX migration of `cordova-android`. We (the team at PSPDFKit, and maintainers of [PSPDFKit/Cordova-Android](https://github.com/PSPDFKit/Cordova-Android)) have previously upgraded our Android library to AndroidX (as many of our customers did with their apps and libraries too). We're currently getting reports of Cordova users that fail to upgrade due to the lack of AndroidX support in `cordova-android`. We've performed a brief analysis of the current situation, and thought it might be interesting for you as well. There's a couple of factors that should be considered for your schedule for migrating to AndroidX: * Development of the support libraries has been halted and the old support libraries have officially been deprecated. In the next couple of weeks/months, most Android libraries and apps that used the support libs will migrate to AndroidX (if they haven't done so already). The incompatibility we discovered with our own wrapper is probably just the beginning, and `cordova-android` will have to follow this trend to stay compatible with the Android ecosystem. A migration has to happen, the question is when it should be done. * Moving to AndroidX is a breaking change for Cordova, so it should probably be part of the next major update (9.x). While for normal Android apps upgrading to AndroidX is a soft-migration (using Google's automated [Jetifier migration](https://developer.android.com/jetpack/androidx/migrate#migrate) which auto-migrates old `.class` files that use the support libs over to AndroidX) this migration strategy does not work for Cordova, which is built around plugins that ship as `.java` source files. Jetifier was not designed for such a plugin system, and does not operate on source files, which means that all Cordova plugins need to be migrated manually in order to work. * Integrating AndroidX and the support libraries into a single app does not work. While most classes inside AndroidX have been renamed and are now inside the `androidx.*` package, some legacy code is still inside the old support package names, which will cause build errors when trying to integrate both libraries side by side. * Migration to AndroidX will require updates to the Android part of several official Cordova plugins. I don't have an extensive list of plugins that use the support libs yet, but I believe that the effort to migrate these should be manageable. From our experience, migrating works automatic for most parts using Android Studio, or is a matter of search and replace using any other tool. Are there any concrete plans for migration to AndroidX so far, and if so, could you share them with us? Any feedback would be highly appreciated.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
