[英]Meaning of asterisk and arrow symbols in Gradle dependencies tree
I have run gradlew
command to get Gradle dependencies tree :我已经运行
gradlew
命令来获取 Gradle依赖关系树:
gradlew.bat app:dependencies
gradlew.bat 应用程序:依赖项
On output I am getting different type of symbols attached with each dependency:在输出中,我得到了每个依赖项附带的不同类型的符号:
com.twotoasters.servos:util-otto:1.0.0
com.squareup.okhttp:okhttp:2.4.0 (*)
com.android.support:recyclerview-v7:23.2.0 -> 25.0.0
Some dependencies are without any symbol, some are with (*)
and ->
.有些依赖项没有任何符号,有些依赖项带有
(*)
和->
。
What do these symbols mean?这些符号是什么意思?
I have tried to search this, but failed to find any help on this.我试图搜索这个,但没有找到任何帮助。
(*)
stands next to the dependency, which has already been imported though other artifact, thus resulting in duplication. (*)
位于依赖项旁边,该依赖项已通过其他工件导入,因此导致重复。
At the end of the output of ./gradlew:app:dependencies
you can see this:在
./gradlew:app:dependencies
输出的末尾,您可以看到:
->
stands next to the dependency, which has already been imported through other artifact, but with a newer version . ->
位于依赖项旁边,该依赖项已通过其他工件导入,但版本较新。 Gradle will prefer the newer version. Gradle 会更喜欢较新的版本。
Hence, com.android.support:recyclerview-v7:23.2.0 -> 25.0.0
would mean, that 25.0.0
version is already imported, but particularly that artifact is dependent on an older 23.2.0
version.因此,
com.android.support:recyclerview-v7:23.2.0 -> 25.0.0
意味着25.0.0
版本已经导入,但特别是该工件依赖于较旧的23.2.0
版本。
See explanation by Egor Andreevici from his "Making the most of your Gradle Builds" talk from Droidcon Italy 2017.请参阅Egor Andreevici在 Droidcon Italy 2017 上的“充分利用您的 Gradle 构建”演讲中的解释。
->
means from version 23.2.0
to 25.0.0
its useful when running gradle in offline mode so it will use the first cached version that is available (*)
im not sure but i think it is for downloading and compiling all of the following library family (core,etc...) also there is +
which is used instead of version code which will use the latest version that is available ->
表示从版本23.2.0
到25.0.0
它在离线模式下运行 gradle 时很有用,因此它将使用可用的第一个缓存版本(*)
我不确定但我认为它用于下载和编译以下所有内容库系列(核心等...)也有+
用于代替版本代码,它将使用可用的最新版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.