Skip to content

Stop preguarding #45

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
ashwinraghav opened this issue Sep 25, 2018 · 1 comment · Fixed by #44
Closed

Stop preguarding #45

ashwinraghav opened this issue Sep 25, 2018 · 1 comment · Fixed by #44

Comments

@ashwinraghav
Copy link
Contributor

Firebase SDKs are currently shipped as proguarded artifacts.

Among other things, we have been doing this to minimize the size impact for the millions of developers who chose to not proguard their own apps. While this continues to have the desired effect for libraries that bake in dependencies, all open sourced projects have dependencies that are brought in via pom files that accompany releases.

Firebase Storage

App Proguard Enabled SDK Proguard Enabled apk size
Yes Yes 739K
Yes No 740K
No Yes 1.6M
No No 1.7M

Firebase Functions

App Proguard Enabled SDK Proguard Enabled apk size
Yes Yes 804K
Yes No 804K
No Yes 1.8M
No No 1.8M

Firebase Firestore

App Proguard Enabled SDK Proguard Enabled apk size
Yes Yes 1.3M
Yes No 1.3M
No Yes 3.9M
No No 4.0M

Firebase Database

App Proguard Enabled SDK Proguard Enabled apk size
Yes Yes 769K
Yes No 830K
No Yes 1.8M
No No 1.8M

With dependencies being brought in by the developer's build system based on the pom.xml, it can be seen that any significant improvement in size can come only if the developer proguards their apk.

Given the limited value that proguarding the SDK itself has, it makes sense to stop proguarding SDKs in the interest of easier debugging and simpler tooling

@DevByStarlight
Copy link

DevByStarlight commented May 21, 2019

Thanks for the analysis @ashwinraghav.

However, @bjornick or whoever, I am curious what proguard exception rules were used so we can use the same rules in our application builds.

If the answer is: "depends on which library", then is the best approach to dig, individually, though the sub-projects in the Firebase Quickstart Android GitHub?

@firebase firebase locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants