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

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

  • Gradle: org.nd4j: nd4j-native: linux-ppc64le: 0.6.0
  • Gradle: org.nd4j: nd4j-native: macosx-x86_64: 0.6.0
  • Gradle: org.nd4j: nd4j-native: windows-x86_64: 0.6.0
  • Gradle: org.nd4j: nd4j-native: linux-x86_64: 0.6.0

I want to exclude nd4j-native: linux-ppc64le and nd4j-native: macosx-x86_64, since my application does not support these platforms. I write in the Gradle file:

configurations {
    all.collect { configuration ->
        configuration.exclude(group: 'org.nd4j', module: 'nd4j-native', classifier: 'linux-ppc64le')
    }
}

Gradle says:

Error: (44, 0) Failed to set unknown property “classifier” for an object of type org.gradle.api.internal.artifacts.DefaultExcludeRule.

Gradle does not seem to support classifier exception.

?

: Gradle , , , ?

+4
1

?

, - , . .

, , grooup, . .

0

Source: https://habr.com/ru/post/1664824/


All Articles