title: How can I remove a library from the aar using gradle?
body: <p>I'm currently building an android plugin for Unity. Because of that I need to include unity's classes.jar, which provides me with some methods in the com.unity3d.player package. </p>
  
  <p>However when i do <code>./gradlew assemble</code> it also packages the classes.jar into the .aar file under libs/classes.jar.</p>
  
  <p>Now when I add this .aar to Unity and try to build, I get the following error:</p>
  
  <pre><code>Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/a$1;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/a$2;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/a$a;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/a;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/b$1;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/b$2;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/b;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/c;
  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/d$1;
  
  UNEXPECTED TOP-LEVEL EXCEPTION:
  java.lang.RuntimeException: Translation has been interrupted
      at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
      at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
      at com.android.dx.command.dexer.Main.run(Main.java:277)
      at com.android.dx.command.dexer.Main.main(Main.java:245)
      at com.android.dx.command.Main.main(Main.java:106)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at SDKMain.main(SDKMain.java:129)
  </code></pre>
  
  <p>Unity tries to add the classes.jar to it's android build again, but because the classes.jar is already in the .aar, this fails.</p>
  
  <p>How can I exclude the classes.jar from the .aar?</p>
  
  <p><em>EDIT</em></p>
  
  <p>This is what I can do with the command line to remove the classes.jar</p>
  
  <pre><code>zip --delete tapfortapunity-release.aar "libs/*"
  </code></pre>
  
  <p>How do I call this with gradle?</p>