Fix the gradle plugun to work with scala 2.11
Allow the gradle plugin to accept a closure to modify the request before sending it