I’m struggling with problem that I don’t even know whether it have a solution.
After a bit of struggling on my own I’m asking for your advice.
So, imagine following situation.
Say, there’s a multivariant module “org.shabunc.api:api” with provide 3 variants, VA, VB and VC.
Now, say we have another multivariant module “org.shabunc.api:altapi” which also provides exactly VA, VB and VC.
I know how substitute in build part one of the variants with the same variant from other artefact (though I might be doing it not the best way - see gradle - How to substitute dependency for a specific variant of Kotlin MPP dependency via attribute selectors? - Stack Overflow) doing something like this.
How imagine the the module I want to substitute has not three but two variants, say, VC is missing.
Is it possible to 1) introduce missing variant via modifying metadata somehow and 2) point this newly created variant to its alternative (in this case - actually existing counterpart).
In other word, can I trick all consumers into consuming original module which misses one of variants and introduce this missing variant via substitution?