Is there Gradle “dependencies ” task for buildScript dependencies?

前端 未结 3 1797
悲&欢浪女
悲&欢浪女 2020-12-15 04:47

One can run gradlew dependencies to learn about dependencies of module tasks. It there a way to find transitive dependencies of buildscript dependencies

相关标签:
3条回答
  • 2020-12-15 05:19

    You can use this command:

    gradle dependencyInsight --dependency gradle
    

    There is awesome tutorial by Udacity, Gradle for Android, but you can watch this video for more explanation.

    0 讨论(0)
  • 2020-12-15 05:30

    I think you're looking for Gradle's DependencyInsightReportTask

    0 讨论(0)
  • 2020-12-15 05:35

    Unfortunately there is no way to specify the build script configuration to the implicit dependencies task via the CLI. You'll have to explicitly define a task of type DependencyReportTask configured with your build script configuration.

    task buildscriptDependencies(type: DependencyReportTask) {
        configurations = [buildscript.configurations.classpath]
    }
    

    Update:

    Beginning with Gradle 2.10 you can now get information on buildscript dependencies via

    gradle buildEnvironment
    
    0 讨论(0)
提交回复
热议问题