Use fine-grained Google Play Services libraries

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
4 years ago
3 years ago

People

(Reporter: rnewman, Assigned: nalexander)

Tracking

(Blocks 2 bugs)

Trunk
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
E.g., com.google.android.gms:play-services-cast.

Needs to use the current (v6.5+) Play Services, but it allows us to unbundle. This means we get more control over our dependencies, less need to ProGuard (though we still should), and faster builds.

http://android-developers.blogspot.com/2014/12/google-play-services-and-dex-method.html

Setting tracking so this gets on people's radar.
I'll take the initial investigation on this.
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
OK, this is interesting.  If you don't use the AAR files in the Maven repository, you can only use the monolithic play services JAR.  Said JAR clocks in just under 4M and that doesn't include resources.  (I've checked that it's the only JAR provided, and that the GPS version is 6.5.7.)  This is what we do now.

To get the fine-grained dependencies, we need to use the AAR files.  I can't say for sure, but assuming we need -base and -cast we get about 1.2M of code *and* resources.

I know how to arrange to use the AAR files in our existing build system, but this ticket feeds into a larger build system discussion about using an external build system (like Gradle, but also possibly Buck, or Pants, or even (shudder) Ant).  I have a blog post written about this to post!

The next steps on this ticket will be for me to surface the larger discussion to the mobile team.
Blocks: 1114998
tracking-fennec: ? → 38+
This shouldn't be tracking a particular release.
tracking-fennec: 38+ → ---
(In reply to Nick Alexander :nalexander from comment #2)
> OK, this is interesting.  If you don't use the AAR files in the Maven
> repository, you can only use the monolithic play services JAR.  Said JAR
> clocks in just under 4M and that doesn't include resources.  (I've checked
> that it's the only JAR provided, and that the GPS version is 6.5.7.)  This
> is what we do now.
> 
> To get the fine-grained dependencies, we need to use the AAR files.  I can't
> say for sure, but assuming we need -base and -cast we get about 1.2M of code
> *and* resources.
> 
> I know how to arrange to use the AAR files in our existing build system, but
> this ticket feeds into a larger build system discussion about using an
> external build system (like Gradle, but also possibly Buck, or Pants, or
> even (shudder) Ant).  I have a blog post written about this to post!

I have patches up for review for this work in Bug 1108782.
Depends on: 1108782
I'm going to call this done via Bug 1108782.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
(Assignee)

Updated

3 years ago
Blocks: 1247047
You need to log in before you can comment on or make changes to this bug.