HipByte / motion-gradle

Integrate 3rd-party Java dependencies in RubyMotion for Android projects using Gradle
MIT License
16 stars 10 forks source link

Not working as expected with Google Play Services #16

Closed GantMan closed 9 years ago

GantMan commented 9 years ago

In an app, you can specify a single, or even a set of google play services

    dependency "com.google.android.gms", :artifact => "play-services-gcm", :version => "7.3.0"
    dependency "com.google.android.gms", :artifact => "play-services-identity", :version => "7.3.0"

And this will compile just fine.

But should you decide to render ALL google play services

    dependency "com.google.android.gms", :artifact => "play-services", :version => "7.3.0"

This will pass gradle:install but cause the actual application to fail to compile with the error:

Create vendor/Gradle/aar/play-services-7.3.0/classes.jar.bridgesupport
unzip:  cannot find or open /Users/gantman/Documents/Projects/rubymotion/some_app/vendor/Gradle/aar/play-services-7.3.0/classes.jar, /Users/gantman/Documents/Projects/rubymotion/some_app/vendor/Gradle/aar/play-services-7.3.0/classes.jar.zip or /Users/gantman/Documents/Projects/rubymotion/some_app/vendor/Gradle/aar/play-services-7.3.0/classes.jar.ZIP.
rake aborted!

Seems to be some kind of disconnect in the communication of Gradle files with RMA.

jjaffeux commented 9 years ago

is #18 solving this too @GantMan ?

skellock commented 9 years ago

This looks to be a different issue. (sorry for butting in here)

"play-services" by itself contains no jars inside. Perhaps it only exists as a placeholder to chain dependencies?

If that's that case and jarless aars are a thing, its a quick fix in the same method as #18 changed.

I'm not that familiar with gradle to know without Googling for sure. In theory it makes sense. As does communism.

GantMan commented 9 years ago

correct, I doubt that #18 fixed this. I'll try to give it a check when I can, but I'm pretty packed with TODOs on Android right now :(

jjaffeux commented 9 years ago

@GantMan can you try master with the latest fix please (2c45c09d6338f9e0f5a4d646dc7f68b3ae42c9a8) ? And also check if you don"t have regressions on other projects, I didn't find any but...

GantMan commented 9 years ago

looks good! thanks bud

jjaffeux commented 9 years ago

@GantMan awesome I will do a release

jjaffeux commented 9 years ago

@GantMan Forgot to tell, I have seen some google play service libs use .aidl files which are not yet supported by RM, we could try to support it directly in motion-gradle if needed I guess, and then backport it in RM, let me know if you do some work that uses a lib with aidl files inside, I could try to fix it.

GantMan commented 9 years ago

AIDL files are very important. Not just for this, but it's really biting me/us in a few other places. Elevating the importance of AIDL files would be greatly appreciated.