title: How to import **some** parts of guava library into Android app (gradle)
body: <p>As any Android developer should know, there is a 65k method limit for your apk (because the VM has just 16 bits for method handling). It should be quite hard to reach by your own, but it's easy as soon as you start to add some libraries.</p>
  
  <p>Since last year you can get rid of this by enabling MultiDex on Android 5.0 and above (and adding a support library for prior Android versions). Even when this is possible, it's always better to reduce the methods number and get a smaller api (and the performance should be better, shouldn't it?).</p>
  
  <p>At certain point the Android guys realized the size of their Google Play Services library was unaffordable (20k methods) and they took the great decision of <strong>split it up in different modules</strong>, so you can add simply the parts you need like (with grade):</p>
  
  <pre><code>compile ('com.google.android.gms:play-services-analytics:8.1.0')
  compile('com.google.android.gms:play-services-appindexing:8.1.0')
  </code></pre>
  
  <p><strong>Do you know if is it possible to do something like that with Guava library?</strong>  It's around 15K methods, so it will be really helpful. I would like to use just a small part of Guava, so I don't need/want to include the other. I've been looking in the documentation and googling, but nothing found.</p>
  
  <pre><code>compile group: 'com.google.guava', name: 'guava', version: '18.0'
  </code></pre>
  
  <p>Some guy asked something similar two years ago, probably for a Java project, but didn't exist smaller guava parts then. <a href="https://stackoverflow.com/questions/16563760/downloading-part-of-guava-libraries">Downloading part of guava-libraries</a></p>
  
  <p>The only thing that comes to my mind is to copy just the needed Guava classes instead of loading the library, but I think is an awful solution.</p>
  
  <p>Don't you think any big library should use a module splitting system like they did with Play Services? </p>
  
  <p><strong>EDIT</strong>: Besides, the multidex task takes too long (one minute and a half when before was less than 15 seconds), so each time I want to launch the app I have to wait. So, even when using Proguard is a great solution for a production release, it's not suitable for development as it takes longer than multidexing.</p>