Upgrade to Pro — share decks privately, control downloads, hide ads and more …

When should we drop Jetifier?

When should we drop Jetifier?

These slides are a lightning talk of cookpad.apk#3 which is a Cookpad's event in Japan.
The aim is not a technical approach but just a warning for those who don't take care of Jetifier stuff.

Matsuda Jumpei

July 23, 2019

More Decks by Matsuda Jumpei

Other Decks in Programming


  1. When should we drop Jetifier? Cookpad.apk #3 LT

  2. Don't feed me Jumpei Matsuda / Daruma ▸ Software Architect

    @DeployGate ▸ GitHub: jmatsu ▸ Twitter: red_fat_daruma ▸ Interest in SF Maintenance/Reliability ▸ CI/CD, Testing, Delivery/Feedback cycle, etc. 2
  3. AndroidX ▸ New generation of Support Library ▸ Strict Semantic

    Versioning ▸ Inseparate from Android OS Versions ▸ Finer-grained modules ▸ Support Library is no longer under the maintenance ▸ New Projects should use AndroidX ▸ Existing Projects should be migrated 3
  4. Jetifier ▸ Allow you to mix Support Library and AndroidX

    ▸ Transform Support Library to AndroidX ▸ Modify Java/Kotlin, POM, XML, Proguard by using ASM else ▸ In proguard configurations, android.support.* will be transformed to eligible androidx packages ▸ AGP apply do jetification at the build-time if configured 4
  5. Concern about keeping Jetifier-ed ▸ Slow build? ▸ This has

    been solved. Jetifier transformation won't be applied to artifacts which contain AndroidX since 1.0.0- beta05 ▸ Jetifier is still in beta ▸ i.e. Jetifier potentially cause a build error if a bug is shipped. Hopefully, they won't do so... 5
  6. When should we drop Jetifier? A. As soon as possible

    ▸ Recommend you to integrate this with your development pipeline and check if you can remove Jetifier
  7. https://github.com/plnice/can-i-drop-jetifier can i drop jetifier ▸ A Gradle plugin to

    detect remaining artifacts which use Support Library ▸ If no artifact is found, let's disable Jetifier! You are lucky! ▸ Otherwise, you cannot disable Jetfier yet ▸ Depends on 3rd party library authors... 7
  8. e.g. mopub has no plan to support AndroidX for now

    ▸ https://github.com/mopub/mopub-android-sdk/issues/ 311 ▸ > we currently do not support AndroidX, and there's no plan to support it for the foreseeable future. I'll raise this request internally to see what can be done! 8
  9. 9

  10. https://developer.android.com/studio/command-line/jetifier Standalone Jetifier ▸ For who want to do jetification

    manually ▸ Support de-jetification ▸ You might be able to ▸ Know how Jetifier works ▸ Disable Jetifier from AGP by embedding jetified aars/jars ▸ Use AndroidX artifacts on your project using Support Library ▸ I'm unsure who wants to do so 10
  11. When CAN we drop Jetifier? A. Someday

  12. Thank you for listening Jumpei Matsuda / Daruma ▸ Software

    Architect @DeployGate ▸ GitHub: jmatsu ▸ Twitter: red_fat_daruma ▸ Please feel free to ask me any questions ▸ e.g. CI/CD, App Distribution, Sake 12