Gradle Plugin for Nonstandard C Library Builds

I can’t use the “C” plugin to build a C library on AIX, because it insists on using the (nonexistant) gcc compiler, and it doesn’t know anything about the AIX Unix library build utilities. I assume I should try to build a custom plugin to execute the commands, which are already quite familiar to me. But the custom plugin documentation I’ve found on the web don’t seem to go into the details of entering arbitrary command-lines to Unix. So can anyone help me understand how to write a custom plugin that will apply an arbitrary command-line to all .c files in /src, using all header files in .headers, then apply another arbitrary command-line to all the objects created … well, wherever groovy creates them? Thanks!

Another way of wording my question is: How can I use the “C” plugin, using my own choice of toolset, and toolset commands?