title: Android - What is the purpose of multiDexKeepProguard ? How does it compare to proguardFiles close in gradle?
body: <p>I have created a multidex app. But in regards to proguard i have the following in build.gradle:</p>
  
  <pre><code>    android {
      defaultConfig {
          ...
          multiDexEnabled true
      }
      productFlavors {
          dev {
              // Enable pre-dexing to produce an APK that can be tested on
              // Android 5.0+ without the time-consuming DEX build processes.
              minSdkVersion 21
          }
          prod {
              // The actual minSdkVersion for the production version.
              minSdkVersion 14
          }
      }
      buildTypes {
          release {
              minifyEnabled true
          ***    proguardFiles getDefaultProguardFile('proguard-android.txt'),
                                                   'proguard-rules.pro'
          }
      }
  }
  dependencies {
      compile 'com.android.support:multidex:1.0.1'
  }
  </code></pre>
  
  <p>My question is about the progardFiles vs using <a href="https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html#com.android.build.gradle.internal.dsl.BuildType:multiDexKeepProguard" rel="noreferrer">multiDexKeepProguard</a>. The documentation states:</p>
  
  <blockquote>
    <blockquote>
      <p>File multiDexKeepProguard</p>
    </blockquote>
    
    <p>Text file with additional ProGuard rules to be used to determine which
    classes are compiled into the main dex file.</p>
    
    <p>If set, rules from this file are used in combination with the default
    rules used by the build system.</p>
  </blockquote>
  
  <p>So if i do not use the multiDexKeepProguard then my classes still get compiled but may not end up in the main dex file, is that correct ? I am not clear how this differs from proguardFiles. </p>
  
  <p>Android documentation also <a href="https://developer.android.com/studio/build/multidex.html" rel="noreferrer">references this</a>. </p>