Working gradle build

This pull request contains changes to moxie proxy fixing gradle builds
and a simple gradle based project allowing you to test the fixes.

Note: The "other" pull request contains just the gradle based project.
The gradle build of this other pull request will fail, since the fixes aren't
included.