Extension Modules in plugins?

I am attempting to make a simple gradle plugin that sets up a workspace among other things for the development of sponge plugins. In the plugin I use extension modules to enrich gradle/groovy classes for convenience. Is this possible?

In my first attempts the modules failed to apply which I have attempted to fix with an adaption of this stack overflow issue however it does not appear to be applying correctly. An example of this can be found at here, with the plugin class here and the extension module application code here.

Thanks in advance, Joshua.