An OK solution. Added this to the build gradle.
def siteCustomizationMacroDir = file("../SiteCustomizationAllPlugin/src/main/resources/META-INF/resources/templates/macros")
tasks.named("processResources") {
// Package shared velocity macros into this plugin's web-resource template path.
if (siteCustomizationMacroDir.exists()) {
from(siteCustomizationMacroDir) {
include "ansirMacros.vm", "xtkMacros.vm"
into "META-INF/resources/templates/macros"
}
} else {
logger.warn("SiteCustomization macro directory not found: " + siteCustomizationMacroDir)
}
}
Then parse the macro files instead at the top of each template needing them. Not as clean as before but lets me keep one master location for the templates. Still a bit of changes for clobbering, but I think it will be an acceptable trade off.