How can one declare a flavor-specific fallback dependency?

Hello! In our android project, we have many different flavors. We now want to integrate a dependency for one Brand only, and use our own no-op “dependency” for the others, as to not make our android app’s size bigger for the other Brands.

I first tried out using a fallback like this, but later noticed that it did not work, because there were multiple classes and thus the fallback did not work at all.

implementation project(':instabug') // no-op
brandSpecialImplementation 'com.instabug.library:instabug:9.0.5'

Currently, I am now specifying the no-op dependency for all “normal” brands individually, but this is tedious and as we add more brands in the future, will have to be continuously edited:

brand1Implementation project(':instabug')
// ...
brand12FuelImplementation project(':instabug')
brandSpecialImplementation 'com.instabug.library:instabug:9.0.5'

So my question is: Is there a way to define a fallback dependency in some sort of way?