Extract build dependencies into a common module.