Build file and remove gradle directory