Use groovy to relax type checking since type changed for 1.11

Should fix issue #22

I have only tested on gradle 1.11 but eyeballing gradle 1.8 looked like it would work too.  The issue is caused by a type change, in 1.8 getServices() returns a ServiceRegistryFactory() while in 1.11 it returns a ServiceRegistry(), moving this file to groovy for its dynamic typing smooths over the issue.