title: How do I shrink Android code with Proguard
body: <p>Since I am using many dependencies in my app, I am reaching the 65k Method Limit (I am reaching 76k methods). I've read on android.developer that proguard is used to shrink the code.</p>
  
  <p>So - does proguard only shrink my application code or does it shrink the code of my dependencies too? Do I need to be wary of something when shrinking code with proguard? How do I do that?</p>
  
  <p>My Gradle Build:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 21
  buildToolsVersion "21.1.2"
  
  defaultConfig {
      applicationId "some.Path"
      minSdkVersion 15
      targetSdkVersion 21
      versionCode 1
      versionName "1.0"
  }
  
  packagingOptions {
      exclude 'META-INF/DEPENDENCIES'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/NOTICE.txt'
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE.txt'
  }
  
  buildTypes {
      release {
          minifyEnabled true
          shrinkResources true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      debug {
          debuggable true
          minifyEnabled true
          shrinkResources true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  configurations {
  compile.exclude group:  'org.apache.xmlbeans'
  }
  
  repositories {
  maven { url "https://jitpack.io" }
  }
  
  dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:21.0.3'
  compile 'com.github.PhilJay:MPAndroidChart:v2.1.0'
  compile 'com.opencsv:opencsv:3.4'
  compile 'org.apache.poi:poi:3.12'
  compile 'org.apache.poi:poi-ooxml:3.12'
  }
  </code></pre>