Refactore build configuration