title: android gradle shrinkresources no injars is generated in components.flags file
body: <p>I added the shrink options to my <em>gradle</em>, while the following error always happens:  </p>
  
  <pre><code>:app:shrinkDefaultConfigDebugMultiDexComponents FAILED
  Error:Execution failed for task    
  :app:shrinkDefaultConfigDebugMultiDexComponents'.
  java.io.IOException: The output jar [[mypath]/componentClasses.jar] must be specified after an input jar, or it will be empty.
  </code></pre>
  
  <p>Here is my <em>gradle config</em>:</p>
  
  <pre><code>debug{
          project.archivesBaseName = "zcctest131"
          signingConfig signingConfigs.myConfig
  
          minifyEnabled true
          shrinkResources true
   }
  </code></pre>
  
  <p>and I also enabled the multidex options as :</p>
  
  <pre><code> multiDexEnabled = true
  </code></pre>
  
  <p>compile <code>'com.android.support:multidex:1.0.1'</code></p>
  
  <p>By checking the generated component.flags file, whose path is <code>app/build/intermediates/multi-dex/defaultConfig/debug/components.jar</code>, I found the first line become :</p>
  
  <pre><code>outjars /Users/zcc/app/build/intermediates/multi-dex/defaultConfig/debug/componentClasses.jar
  </code></pre>
  
  <p>The :</p>
  
  <pre><code>injars /Users/zcc/app/build/intermediates/multi-dex/anZhi/release/allclasses.jar
  </code></pre>
  
  <p>is missing which causes the <code>IOException</code>. </p>
  
  <p>The proguard source code is as follows for your reference:</p>
  
  <pre><code> /**
   * Reads the input jars (or directories).
   */
  private void readInput() throws IOException
  {
      if (configuration.verbose)
      {
          System.out.println("Reading jars...");
      }
  
      // Check if we have at least some program jars.
      if (configuration.programJars == null)
      {
          throw new IOException("The input is empty. You have to specify one or more '-injars' options.");
      }
  
      // Read the input program jars.
      readInput("Reading program ",
                configuration.programJars,
                createDataEntryClassPoolFiller(false));
  </code></pre>
  
  <p>...</p>
  
  <p><a href="http://proguard.sourceforge.net/quality/compatibility/code/proguard/ProGuard.html" rel="nofollow noreferrer">http://proguard.sourceforge.net/quality/compatibility/code/proguard/ProGuard.html</a></p>
  
  <p>How can I fix this?
  Thanks a lot.</p>