How to exclude dependency with classifier (platform version) in Gradle?

后端 未结 2 1214
死守一世寂寞
死守一世寂寞 2021-02-13 03:38

In my project I have dependency on \'org.nd4j:nd4j-native-platform:0.6.0\' which brings me transitive dependencies:

  • Gradle: org.nd4j:nd4j-native:linux-ppc64le:0.6.
2条回答
  •  遇见更好的自我
    2021-02-13 04:16

    How to exclude such a transitive dependencies?

    I think, the only way is to exclude all transitive dependencies by it's module or group and manually provide dependencies on libraries for platforms your application supports. Because classifiers are supported in dependency declaration.

    And the same way you can handle the case, when you have a number of dependencies with the same module and grooup, but with different classifiers. Just add such dependencies manually with it's classifier property.

提交回复
热议问题