Migrating to gradle

Hi, thank you for great library! It would be even more useful if it will be available as gradle dependency.
I made a first step by migrating project to gradle and splitting library code from sample code. Next step can be to push library to maven central, I can help you do it if you'll agree.