I'd imagine all that would be possible should this SPM proposal advance further: Extensible Build Tools