This message was deleted.
# community-support
s
This message was deleted.
e
if that's your use case, IMO it sounds like it would be easier to do with an artifact transform in X, Y, Z than to produce all of them from C
t
Have a look at https://docs.gradle.org/current/userguide/cross_project_publications.html rather. The way you attach an artifact to an outgoing configuration is through a task, so you could have a task that generates version 5 and another that generates version 6 (could be `Copy`/`Sync` tasks with filters for instance)
t
that looks to be the way to go - thanks for your input 🙂
If i select an explicit capability, shouldnt that cause the corresponding variant/configuration to be chosen? i have the following in the dependant project:
Copy code
dependencies {
    composite("com.tcnicn.project:configuration") {
        capabilities {
            requireCapability("com.tcnicn.project:config:4")
        }
    }
}
yet i still get the following error:
Copy code
* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all task dependencies for configuration ':compileClasspath'.
   > Could not resolve com.tcnicn.project:configuration.
     Required by:
         project :
      > The consumer was configured to find an API of a library compatible with Java 17, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally. However we cannot choose between the following variants of project :configuration:
          - config4
          - config5
        All of them match the consumer attributes:
          - Variant 'config4' capabilities com.tcnicn.project:config:4 and com.tcnicn.project:configuration:5.0.0-dev declares a runtime of a library, preferably in the form of class files, and its dependencies declared externally:
              - Unmatched attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
          - Variant 'config5' capabilities com.tcnicn.project:config:5 and com.tcnicn.reauth:configuration:5.0.0-dev declares a runtime of a library, preferably in the form of class files, and its dependencies declared externally:
              - Unmatched attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
figured it out - it looks like gradle does not take the capability version into account if i switch the capability notation to
com.tcnicn.project:config4:1
it works