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:
compile 'com.google.android.gms:play-services-gcm:7.5.0'
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:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;
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?
Thanks in advance!