My Android app has a number of flavors: Production, Staging, Review, etc. as well as Release and Debug build types. When I run ./gradlew app:dependencies
it naturally returns a dependency tree with each flavor/build type:
This results in a dependency tree with over 32000 lines, making it a bit difficult to evaluate. What I'm looking for is a dependency command where I can specify the flavor and build type to avoid having a monstrous dependency tree report, something like:
./gradlew app:stagingDebugDependencies
Any help, tips and or hints are greatly appreciated.
You can get the dependecy tree for a particular flavor and build type combination by running:
./gradlew app:dependencies --configuration <flavorAndBuildType><classpath>
Classpath can be either RuntimeClasspath or CompileClasspath depending on if you're interested in compiletime or runtime dependencies.
An example of getting the runtime dependency tree for the paid version of an app, hitting the production servers and building it for debug would be:
./gradlew app:dependencies --configuration paidProdDebugRuntimeClasspath