//Package packageManifest = serviceLocator.getProjectService().getPackageManifestFactory().getPackageManifest(project);
String type = deploymentComponent.getComponent().getComponentType();
boolean isObject = type.equals(Constants.CUSTOM_OBJECT);
boolean isSharingRule = Constants.ABSTRACT_SHARING_RULE_TYPES.contains(type) || Constants.SHARING_RULE_TYPES.contains(type);
if(isObject) {
boolean isPresent = new PackageManifest(packageManifest).contains("CustomObject", deploymentComponent.getComponent().getName());
if (isPresent) {
factory.addComponentToManifest(manifest, deploymentComponent.getComponent());
}
}
//If it's a sharing rule, we will add it from the project manifest