title: Android/Gradle/Unity - include all dependencies in AAR plugin
body: <p>I want to build a plugin for wrapping the latest Google Cloud Messaging API (GCM) for Unity. I wrote Java code to do it and included the GCM plugin to my gradle build:</p>
  
  <pre><code>compile 'com.google.android.gms:play-services-gcm:7.5.0'
  </code></pre>
  
  <p>Since the target is Unity I need to create either an AAR or a JAR + resources to be included in Assets/Plugins/Android, and they need to include all transitive dependencies (including appcompat and the play services themselves). If I compile the app with my AAR from Unity, I get:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;
  </code></pre>
  
  <p>Which is normal since the AAR doesn't contain the dependent Google Play classes. And I can't find a standalone JAR for the GCM modules. I'm lost, what do I need to get an AAR/JAR with all dependencies bundled?</p>
  
  <p>Thanks in advance!</p>