[build] Port build system to gradle