@CheckForNull private static String getProjectKeyWithBranch(AnalysisProperties props) { String projectKey = props.property(CoreProperties.PROJECT_KEY_PROPERTY); if (projectKey != null && props.property(CoreProperties.PROJECT_BRANCH_PROPERTY) != null) { projectKey = projectKey + ":" + props.property(CoreProperties.PROJECT_BRANCH_PROPERTY); } return projectKey; }
public ProjectReactor execute() { Profiler profiler = Profiler.create(LOG).startInfo("Process project properties"); Map<String, Map<String, String>> propertiesByModuleId = new HashMap<>(); extractPropertiesByModule(propertiesByModuleId, "", taskProps.properties()); ProjectDefinition rootProject = defineRootProject(propertiesByModuleId.get(""), null); rootProjectWorkDir = rootProject.getWorkDir(); defineChildren(rootProject, propertiesByModuleId); cleanAndCheckProjectDefinitions(rootProject); // Since task properties are now empty we should add root module properties taskProps.properties().putAll(propertiesByModuleId.get("")); profiler.stopDebug(); return new ProjectReactor(rootProject); }