Sergej Koščejev
06/27/2024, 5:18 PMconfiguration.incoming.artifactView { attribute(A, A1) } and the same for A2 but when I filter for A2 I get all the artifacts (probably because of compatibility).
Can I somehow filter a configuration based on the exact attribute value?Vampire
06/27/2024, 8:26 PM.artifacts.resolvedArtifacts. On the result you can then get the actual attribute values and do your own filtering using ResolvedArtifactResult#variant.attributes. You get the key set on that, search the attribute by name and then get the value for the attribute. Remember to do it like I said and not use some ready-made attribute instance as key, because whether an artifact is coming for example from the currently running code or from an included build, or from a Gradle Module Metadata file makes big differences, but the name is stable to use here. The value can also be differently typed the same, for example if an OperatingSystemFamily attribute is coming from running code, the value will be OperatingSystemFamily, if it is coming from GMM, it will be String. So you should also thoroughly test all possible situations. 🙂Sergej Koščejev
06/28/2024, 8:59 AMSergej Koščejev
06/28/2024, 9:00 AMVampire
06/28/2024, 9:08 AMSergej Koščejev
06/28/2024, 9:19 AM