Core method to build cortex project.