[英]Android Flavor Specific Dependency Tree
My Android app has a number of flavors: Production , Staging , Review , etc. as well as Release and Debug build types.我的 Android 应用程序有多种风格: Production 、 Staging 、 Review等,以及Release和Debug构建类型。 When I run ./gradlew app:dependencies
it naturally returns a dependency tree with each flavor/build type:当我运行./gradlew app:dependencies
它自然会返回一个具有每种风格/构建类型的依赖树:
This results in a dependency tree with over 32000 lines, making it a bit difficult to evaluate.这导致依赖树超过 32000 行,使其有点难以评估。 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. Classpath 可以是 RuntimeClasspath 或 CompileClasspath 取决于您是否对编译时或运行时依赖项感兴趣。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.