Hi,
I have a question please. I have a module, that depends on another modules configuration. That configuration has an artifact with a ‘classifier’ specified.
dependencies {
api project(path: ":cavis-native:cavis-native-lib", configuration: "runtimeElements")
}
That works so far, the correct artifact gets pulled in. Now when I am publishing using MavenPublish, the generated POM is missing the classifier
<dependency>
<groupId>net.brutex.cavis.cavis-native</groupId>
<artifactId>cavis-native-lib</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
This is how configuration runtimeElements is set in the “producing” module:
--------------------------------------------------
Variant runtimeElements
--------------------------------------------------
Elements of runtime for main.
Capabilities
- net.brutex.cavis.cavis-native:cavis-native-lib:1.0.0-SNAPSHOT (default capability)
Attributes
- org.gradle.category = library
- org.gradle.dependency.bundling = external
- org.gradle.jvm.version = 8
- org.gradle.libraryelements = jar
- org.gradle.usage = java-runtime
Artifacts
- build\libs\cavis-native-lib-1.0.0-SNAPSHOT-windows-x86_64-avx2-cpu.jar (artifactType = jar, classifier = windows-x86_64-avx2-cpu)
- build\libs\cavis-native-lib-1.0.0-SNAPSHOT-windows-x86_64-avx2-cuda.jar (artifactType = jar, classifier = windows-x86_64-avx2-cuda)
- build\libs\cavis-native-lib-1.0.0-SNAPSHOT.jar (artifactType = jar)
How can I achieve to to have the classifier included into the POM dependencies ?
Gradle 7.5.1
Thank you.