【问题标题】:How can I configure the a Gradle configuration, specifically "permitUnusedDeclared" in the gradle-dependency-analyze plugin?如何配置 Gradle 配置,特别是 gradle-dependency-analyze 插件中的“permitUnusedDeclared”?
【发布时间】:2017-07-01 21:19:10
【问题描述】:

我正在使用gradle-dependency-analyze 插件来分析我的 Gradle 项目的依赖关系。 The plugin documentation 声明它允许指定“permitUnusedDeclared”配置来定义应以特殊方式处理的依赖项。但是,我无法弄清楚如何在 Gradle 中进行配置。看来我不是第一个遇到此问题的人,因为有 an open bug report 要求改进有关此特定区域的文档。

因此,我将如何配置我的 build.gradle 以指定此配置?作为一个具体的例子,假设我想使用“org.springframework.boot:spring-boot-configuration-processor:1.4.4.RELEASE”和“org.springframework.boot:spring-boot-starter-actuator:1.4”。 4.RELEASE”作为配置值。

我可以在the Plugin definition 中看到正在添加它;我只是不知道如何在我的项目中实际配置它。

【问题讨论】:

    标签: gradle gradle-plugin


    【解决方案1】:

    根据错误报告中的新comment,解决方案是将这些添加到 build.gradle 的依赖项部分:

    dependencies {
      compile 'org.springframework.boot:spring-boot-actuator:1.4.4.RELEASE'
      compile 'org.springframework.boot:spring-boot-configuration-processor:1.4.4.RELEASE'
      permitUnusedDeclared 'org.springframework.boot:spring-boot-actuator:1.4.4.RELEASE'
      permitUnusedDeclared 'org.springframework.boot:spring-boot-configuration-processor:1.4.4.RELEASE'
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-23
      • 1970-01-01
      • 2016-09-09
      • 1970-01-01
      • 2022-07-31
      相关资源
      最近更新 更多