Improve gradle support.
Fix issue #18