Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "configuration: 'android-endpoints'" and "configuration: 'endpoints'" in build.gradle in Android Studio?

In my app module (which depends on my backend endpoints module), I have the following

dependencies {
    compile project(path: ':backend', configuration: 'android-endpoints')
}

But the following also works.

dependencies {
    compile project(path: ':backend', configuration: 'endpoints')
}

I see that the generated .jar file dependency has the "android" appended to its name in the former case. However, I suspect there is a more fundamental difference between the two. Does anyone know?

I found the following cryptic reference here: https://github.com/GoogleCloudPlatform/gradle-appengine-plugin search for "How do I use a compile dependency on my endpoints client libraries from another project?" in the FAQ section.

Thanks for your help and I hope this isn't a stupid question.

like image 497
Creos Avatar asked Aug 31 '14 04:08

Creos


People also ask

What is build configuration in Android?

Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app. The Android plugin for Gradle works with the build toolkit to provide processes and configurable settings that are specific to building and testing Android applications.

Do I need Gradle for Android studio?

Android Studio comes with a working installation of Gradle, so you don't need to install Gradle separately in that case. In order to create a new build or add a Wrapper to an existing build, you will need to install Gradle according to these instructions.


1 Answers

android-endpoints adds few a extra transitive dependencies to the artifact that are required to use endpoints with android, it also removes some that are already included with android.

included : "google-api-client-android"
excluded : "org.apache.httpcomponents:httpclient"

endpoints only adds "google-api-client" and doesn't exclude anything.

like image 107
loosebazooka Avatar answered Oct 11 '22 08:10

loosebazooka