Stop using gradle deprecated methods

Replace calls to project.configurations.add and
project.tasks.add with the recommended alternatives.
Fix the build scripts' groovy declaration
Call either the new methods or the old methods

If the new (non-deprecated) create methods are available,
then call them to avoid build script warnings in gradle 1.6+.
If the new methods don't exist, then call the deprecated add
methods so that the plugin still works in gradle 1.5.
Bug fix — make the correct metaprogramming check

The .respondsToCheck has been adjusted to check for the presence
of the method we are actually attempting to call.
Merge pull request #42 from seanjreilly/avoid-deprecated-methods

Deprecation warnings in gradle 1.6