Move checkBuildResult method to shared module.