Fix issue #18

Fix issue #18
Improve gradle support