Is there a way to use define symbols with packages?

Hello guys,
The situation: Basically I am working on a console branch, but the consoles have variations. We have different packages for each variation. The problem is, variation A conflicts with variation B, so everytime I build to the platform A I have to manually remove the package, build, and then add the package again, vice-versa to platform B.
Is there a way to do something like:
#if VARIATIONA
use package A
#else
use package B
#endif

The packages assembly definitions ought to have their platform support checkboxes ticked correspondingly:

image

Note that the screenshot is incorrect. You cannot have “any platform” selected and then select individual platforms. That will still amount to “any platform”. I reported this to the docs team.

That screenshot is perfectly valid. The platform selection says “Exclude Platforms” when Any Platform is ticked, meaning you allow the assembly to be used in every platform except the specified ones. Here, we’re excluding tvOS.

You may also refer to how the JSON for assembly definitions have includePlatforms and excludePlatforms.

Right! That “exclude” bit is so unexpected since it toggles with “any platform”. We always have two ways of achieving the same result and I always stick to “include” because that’s easier to read logically.