change build tool from maven to gradle, refactor code

change build tool from maven to gradle, refactor code