This message was deleted.
# community-support
s
This message was deleted.
s
Quoting this:
There is nothing in the version catalog to specify classifiers. You have to put the classifier in the dependency declaration
v
thanks @Sebastian Schuberth
t
Gradle highly encourages using variant-aware resolution (and configuring variants if need be) rather than specifying classifier and/or artifact type explicitly. What you can do is configure group/name/version in the version catalog (note also: it's a version catalog, not a full-fledged dependency management catalog) and declare classifier and artifact type on use:
Copy code
dependencies {
  myConfiguration(libs.ersatz) {
    artifact {
      classifier = 'safe'
      type = 'jar'
    }
  }
}
v
ok, but the the drawback is that I can’t use it in the
bundles
😞
t
You'd have to configure variants then, and arrange for that variant to be selected. See https://docs.gradle.org/current/userguide/component_metadata_rules.html#making_variants_published_as_classified_jars_explicit for example. (I have no idea how this would play with publishing though, in case you're making a library to be published to a maven/ivy repository)
👍 1