'How to get dependencies size with gradle task in Android Studio?
I need to create a task that displays each dependency size when executed.
I've searched for a way to do it and the closest answer is this however, this solution seems to work for non Android projects only.
I'm currently using the tools.build:gradle:3.4.2 and the gradle plugin for android 5.1.1
I would like something to list each dependency and size like:
- Retrofit 2.5.0 ------ 654 KB.
- Butterknife 10.1.0 -- 150 KB.
I tried to implement the gist I linked before but it always says:
ERROR: Cannot change strategy of configuration ':app:androidApis' after it has been resolved.
After removing a piece of the code for multiple configurations:
ERROR: Cannot change strategy of configuration ':app:default' after it has been resolved.
At this point I don't know what to put at configuration...
Solution 1:[1]
[This site is no longer active] I have launched a new website to just do this. I am hoping to build an index for all libraries. The first time the lookup is going to be slow but subsequent lookups will be faster. Please check out the website at droidanalyser.tools
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
