Jetpack comes with a tool, deeply integrated into Gradle, called Jettifier. The net effect of the integration is that if you have this deps chain: your_lib -> third-party-lib -> android_support_lib a few things happen:
- You start using
androix_support_libs instead in your direct deps.
- You start using the newer equivalent APIs in your code.
- You enable Jettifier, which:
- rewrites any deps on the older
android_support_libs artifacts to the newer androidx ones transparently, inside gradle, intercepting the normal deps resolution logic.
- takes any artifacts and rewrites their code references in the bytecode to point at the new apis supplied by androidx/jetpack.
There is a standalone tool (jettifier_standalone) which can do the jar rewriting, and there is a published list of equivalencies which the tool honors, which can be consumed by any deps management. But the bazel_maven_repository rules are in the ecological niche of gradle's deps management here, so we need a feature to do the jetpack-required deps rewriting (probably taking in the file they publish, since a universal rewriting feature is probably useful, and can be useful for large-scale replacement of other kinds, without particularly extra work. However, the big deal will be incorporating the jettifier tool so that, if enabled, it will post-process downloaded jars appropriately.
Jetpack comes with a tool, deeply integrated into Gradle, called Jettifier. The net effect of the integration is that if you have this deps chain:
your_lib->third-party-lib->android_support_liba few things happen:androix_support_libsinstead in your direct deps.android_support_libsartifacts to the newer androidx ones transparently, inside gradle, intercepting the normal deps resolution logic.There is a standalone tool (
jettifier_standalone) which can do the jar rewriting, and there is a published list of equivalencies which the tool honors, which can be consumed by any deps management. But thebazel_maven_repositoryrules are in the ecological niche of gradle's deps management here, so we need a feature to do the jetpack-required deps rewriting (probably taking in the file they publish, since a universal rewriting feature is probably useful, and can be useful for large-scale replacement of other kinds, without particularly extra work. However, the big deal will be incorporating the jettifier tool so that, if enabled, it will post-process downloaded jars appropriately.