Initial conversion to gradle. WIP.