isBrickCompatibleWithMason function

bool isBrickCompatibleWithMason(
  1. BrickYaml brickYaml
)

Returns whether the current brickYaml is compatible with the current version of mason.

Implementation

bool isBrickCompatibleWithMason(BrickYaml brickYaml) {
  final currentMasonVersion = Version.parse(packageVersion);
  final masonVersionConstraint = VersionConstraint.parse(
    brickYaml.environment.mason,
  );

  return masonVersionConstraint.allows(currentMasonVersion);
}