Restructure build environment to use gradle