"配置有什么区别:' android-endpoints'"和"配置:'端点'"在Android Studio的build.gradle中?

时间:2014-08-31 04:47:52

标签: google-app-engine android-studio google-cloud-endpoints android-gradle

在我的app模块(取决于我的后端端点模块)中,我有以下

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

但以下也有效。

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

我看到生成的.jar文件依赖项在前一种情况下在其名称后附加了“android”。但是,我怀疑两者之间存在更为根本的区别。有谁知道吗?

我在这里找到了以下神秘的参考: https://github.com/GoogleCloudPlatform/gradle-appengine-plugin 搜索“如何在另一个项目的端点客户端库上使用编译依赖项?”在FAQ部分。

感谢您的帮助,我希望这不是一个愚蠢的问题。

1 个答案:

答案 0 :(得分:5)

android-endpoints为使用端点与android所需的工件添加了一些额外的传递依赖,它还删除了一些已经包含在android中的东西。

包括:“google-api-client-android”
排除:“org.apache.httpcomponents:httpclient”

endpoints只会添加“google-api-client”并且不会排除任何内容。