【问题标题】:Changing how gradle determine that a version is higher than another更改 gradle 如何确定一个版本高于另一个版本
【发布时间】:2019-06-07 12:41:30
【问题描述】:

我尝试描述一个项目的依赖关系,但我对版本依赖有点问题。

我依赖于“A”版本 1.0.0 依赖于“B”版本 3.4.20 我依赖于“B”版本 3.4.20-P10-XXX

gradle解决依赖时,我的项目依赖于“B”版本3.4.20

我如何告诉他 3.4.20-P10-XXX 中的“B”比 3.4.20 更新?

我尝试使用 resolutionStrategy.force 'xxx:B:3.4.20-P10-XXX' 但这不是我想要的。

我所有的版本都来自 BOM,所以我认为拥有版本硬代码不是一个好的选择。

dependencies {
implementation platform('xxx:x-parent:5.0.0')

implementation 'xxx:B'
implementation 'xxx:A'}

其实: 我的项目依赖于版本为 3.4.20 的 B(在 A 的 pom 中声明)

预期: 我的项目依赖于版本为 3.4.20-PXX-XXX 的 B(在我的 pom xxx:x-parent:5.0.0 中声明)

【问题讨论】:

    标签: gradle build.gradle


    【解决方案1】:

    找到了。

    使用强制平台而不是平台。

    enter link description here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-04
      • 2015-07-15
      • 1970-01-01
      相关资源
      最近更新 更多