Refactor for gradle...

its stupid, but ok...