Today I discover this "experimental" screen in Android Studio.
Some updates says "Gradle promoted library version from..." what means with that?
(I checked the source code and found this: https://github.com/JetBrains/android/blob/master/android/src/com/android/tools/idea/gradle/structure/daemon/analysis/PsModuleAnalyzer.java#L59, but the link in the comment is not really useful)
Go to Android Studio -> Preferences -> Plugins (for Mac) and File -> Settings -> Plugins (for windows) and search “Check for Dependency updates plugin”. Install it and restart android studio. You will be able to see Dependencies tab on the right which will show if any dependency has a new update available.
In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here. If you are using the Gradle wrapper, then your project will have a gradle/wrapper/gradle-wrapper.
Dependencies with the same coordinates that can occur multiple times in the graph are omitted and indicated by an asterisk(*).
This isn't necessary. The order inside the dependencies { } block is preserved. You are kind of right. Dependency ordering is preserved, but for example all compile dependencies will be before testCompile dependencies no matter of how you order them.
This actually means, that Gradle had found some dependency conflict and used default conflict resolution strategy, which is to prefer a newer version of some dependency.
The link from the comment leads to the Gradle official user guide, where is dependency management is described. The most interesting part of it for you is "How dependency resolution works".
For example, you can have a gson-2.6.0
library in your dependencies, but some of your other dependencies need a gson-2.7
and it's loaded as a transitive dependency. This lead to the situation, that you have 2 different versions of the same library within you dependencies and this is called dependency conflict, because Gradle can't add both jars to the classpath at the same time. So it uses default conflict resolution strategy and promotes the declared version from 2.6.0 to the newer one 2.7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With