Google Play Services is no longer a giant monolith
Nowadays it's getting harder and harder to build a meaningful app and not rely on Google Play Services to aid us in some commonly required features such as maps, better location provider, geo fencing and so much more. Unfortunately up until now the library shipped as a giant monolith ripping us from one third of dex method limit. For curious reader here's are method counts in couple of versions:
and a full breakdown.
Today Google has made the awaited, more than usual, version of their SDK available. With the update apart from new features you can finally depend only on a subset of enormous API. Here's a table from documentation along with dex method counts:
|Dex method count
|Google Play Services
|Google Account Login
|Google Activity Recognition
|Google App Indexing
|Google Mobile Ads
|Google Panorama Viewer
|Google Play Game services
Google Cloud Messaging
For me the biggest win is that in one of the apps we are actively developing granular dependency declaration means with a simple change from
I no longer have to run Proguard during development. No wonder my build time just improved by 15 seconds.
This article is cross-posted with my personal blog