I've been fighting with this all weekend and could use some help.

Hope this isn't tl;dr. :-/

Short version: I'm looking for a way to add a "provided" scope, but
the trick where you add a "provided" configuration doesn't seem to
work with android apps that use "productFlavors".

I have an application that uses google maps and device messaging.

I'm am now trying to make it work with amazon maps and device messaging.

I've reconfigured the project to use "productFlavors" named "google"
and "amazon".

I added a dependency for the google flavor like this:
 - googleCompile('com.google.android.gms:play-services:4.0.30')

The google flavor now compiles and works. Joy.

Next, I tried to add the dependency for amazon in a similar way, but
it turns out that the jars for the amazon APIs are just stubs and are
not intended to be deployed with the APK - they are just supposed to
be available at compile time.

Using this "provided" trick adds the jars to the "main" compile classpath.

main{
  compileClasspath += configurations.provided
}

However, that isn't the classpath that's used when compiling the
amazon flavor. I tried to do this:

android.sourceSets.amazon{
  compileClasspath += configurations.provided
}

But I get this error:

Could not find method plus() for arguments [configuration ':provided']
on source set 'compile classpath'.

I've tried 100 things, and nothing seems to work. :-/

Anyone know how to do this?

Larry

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to