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

时间:2022-12-04 20:50:14

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

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

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?

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

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.

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

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

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

1 个解决方案

#1


5  

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.

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

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

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

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

端点只添加“google-api-client”,不排除任何内容。

#1


5  

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.

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

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

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

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

端点只添加“google-api-client”,不排除任何内容。