Skip to content

Disable Jetifier #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

MGaetan89
Copy link
Contributor

@MGaetan89 MGaetan89 commented Jun 4, 2025

Summary

This PR disables Jetifier. This was used to convert old Android Support Libraries to AndroidX. Nowadays, AndroidX has become the standard, and Android Support Libraries are (almost?) no longer used.

Also, disabling Jetifier improves build times:

Latest master (d43801e)

Build: https://github.com/facebook/litho/actions/runs/15437928666

Screenshot 2025-06-04 at 11 40 57

This PR

Build: https://github.com/facebook/litho/actions/runs/15438697966?pr=1059

Screenshot 2025-06-04 at 11 41 17

Changelog

Disable Jetifier.

Test Plan

Successful build on the CI.

@MGaetan89
Copy link
Contributor Author

@zielinskimz this PR should improve build times by disabling Jetifier.

@MGaetan89
Copy link
Contributor Author

@zielinskimz this PR should improve build times by disabling Jetifier.

And in case you missed them, I also have the following PRs ready:

@MGaetan89 MGaetan89 force-pushed the disable_jetifier branch 2 times, most recently from 9dfa999 to df434df Compare June 6, 2025 12:59
@zielinskimz
Copy link
Contributor

I wonder if it's possible that the project compiles fine but crashes at runtime if some 3rd party dependency still relies on the old support library.
Maybe we should use https://github.com/plnice/can-i-drop-jetifier or https://github.com/dipien/bye-bye-jetifier to check if the jetifier can be safely dropped?

@MGaetan89
Copy link
Contributor Author

I wonder if it's possible that the project compiles fine but crashes at runtime if some 3rd party dependency still relies on the old support library. Maybe we should use plnice/can-i-drop-jetifier or dipien/bye-bye-jetifier to check if the jetifier can be safely dropped?

Actually, Android Studio provides this feature out of the box. If you open the "Build" panel, select "Warnings" > "Jetifier" and run the check, you should get:
Screenshot 2025-06-10 at 10 30 30

Also, the plnice/can-i-drop-jetifier plugin is deprecated in favor of the native ./gradlew checkJetifier task, which also says that Jetifier is not needed anymore.

@facebook-github-bot
Copy link
Contributor

@zielinskimz has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@zielinskimz merged this pull request in 414767b.

@MGaetan89 MGaetan89 deleted the disable_jetifier branch June 10, 2025 09:29
@zielinskimz
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants