Andy Damevin
10/28/2025, 9:02 AMAndy Damevin
10/28/2025, 9:03 AMVampire
10/28/2025, 9:51 AMAndy Damevin
10/28/2025, 10:36 AMVampire
10/28/2025, 10:37 AMAndy Damevin
10/28/2025, 10:37 AMVampire
10/28/2025, 10:38 AMVampire
10/28/2025, 10:38 AMAndy Damevin
10/28/2025, 10:40 AMAndy Damevin
10/28/2025, 10:40 AMAndy Damevin
10/28/2025, 10:41 AMVampire
10/28/2025, 10:43 AMVampire
10/28/2025, 10:44 AMAndy Damevin
10/28/2025, 10:45 AMVampire
10/28/2025, 10:45 AMVampire
10/28/2025, 10:45 AMok so in theory, I could create a plugin that allows to set those properties in the user project?Sure
Vampire
10/28/2025, 10:45 AMVampire
10/28/2025, 10:46 AMAndy Damevin
10/28/2025, 10:47 AMAndy Damevin
10/28/2025, 10:47 AMAndy Damevin
10/28/2025, 10:49 AMVampire
10/28/2025, 11:08 AMsince they are now defined as for the JVM tooAh, nice, I didn't know that PR and that it was merged, so indeed from 9.3.0 on they are properly defined, yeah, unless the commit gets reverted before release (such things happened in the past).
what I don't get is why some of those are actually pre-configured out of the box in the user project and some other are just semanticI think big-guy stated it at https://github.com/gradle/gradle/issues/34845#issuecomment-3293230632. I'd exepect that somewhen in the future maybe it will be in Gradle core that also those are added. Actually adding them lightly might be a breaking change, as resolution might change by that. When previously a variant was selected that does not have those properties and then a variant that has them is selected for a library. This might be a good and intended change, but nevertheless it might be breaking.
Andy Damevin
10/29/2025, 9:34 AMAndy Damevin
10/29/2025, 9:35 AMAndy Damevin
10/29/2025, 9:35 AMVampire
10/29/2025, 9:44 AMall, but always configureEach when handling domain object collections you do not own.
Also, you should neither invent new attributes that are named like the official ones but have a totally different type, and you should also usually not declare the attributes in the attributes schema if you are not the maintainer of those attributes but apply the plugin that registers them and also adds compatibility and disambiguation rules as necessary.
And it probably also make sense to set the attributes individually even if one of the values cannot be determined. 🤷♂️Vampire
10/29/2025, 9:45 AMAndy Damevin
10/29/2025, 9:45 AMAndy Damevin
10/29/2025, 9:47 AMVampire
10/29/2025, 9:47 AMVampire
10/29/2025, 9:48 AMVampire
10/29/2025, 9:49 AMMachineArchitecture.MACHINE_ARCHITECTURE_ATTRIBUTE.Vampire
10/29/2025, 9:51 AMThose attributes will just serve in case there are specified in the variant, why would it be a problem for other cases?As I said, the whole attribute resolution mechanism is quite complex and doing something there like inventing new attributes is very hard to do correctly. For example the sheer presence also influences the algorithm. You can read the algorithm, it is documented in the userguide.
Andy Damevin
10/29/2025, 9:51 AMAndy Damevin
10/29/2025, 9:52 AMAndy Damevin
10/29/2025, 9:52 AMAndy Damevin
10/29/2025, 9:56 AMAndy Damevin
10/29/2025, 9:56 AMVampire
10/29/2025, 9:56 AMI suppose we could add rule that only apply if the variant specify the attributeNo, absence is by definition compatible
"Instead apply the plugin that declares those attributes" I am not sure what you mean hereI mean apply from your plugin the plugin that declares those attributes on the attribute schema and sets up its compatibility and disambiguation rules.
Andy Damevin
10/29/2025, 9:58 AMAndy Damevin
10/29/2025, 10:00 AMAndy Damevin
10/29/2025, 10:45 AMAndy Damevin
10/29/2025, 11:01 AM