migrate build to gradle