class SpringCloudFunctionBuildCustomizer implements BuildCustomizer<Build> {

	private final InitializrMetadata metadata;

	private final ProjectDescription description;

	SpringCloudFunctionBuildCustomizer(InitializrMetadata metadata, ProjectDescription description) {
		this.metadata = metadata;
		this.description = description;
	}

	@Override
	public void customize(Build build) {
		DependencyContainer dependencies = build.dependencies();
		if (dependencies.has("cloud-function")) {
			if (dependencies.has("web")) {
				dependencies.add("cloud-function-web", "org.springframework.cloud", "spring-cloud-function-web",
						DependencyScope.COMPILE);
				removeCloudFunction(build);
			}
			if (dependencies.has("webflux")) {
				dependencies.add("cloud-function-web", "org.springframework.cloud", "spring-cloud-function-web",
						DependencyScope.COMPILE);
				removeCloudFunction(build);
			}
		}
	}

	/*
	 * Remove the Spring Cloud Function artifact, making sure that any metadata
	 * information is kept.
	 */
	private void removeCloudFunction(Build build) {<FILL_FUNCTION_BODY>}

	private BillOfMaterials resolveBom(String id) {
		BillOfMaterials bom = this.metadata.getConfiguration().getEnv().getBoms().get(id);
		if (bom != null) {
			return bom.resolve(this.description.getPlatformVersion());
		}
		return null;
	}

}

		Dependency cloudFunction = this.metadata.getDependencies().get("cloud-function");
		// We should make sure whatever metadata this entry convey isn't lost
		// This is a workaround until we provide a feature to deal with this automatically
		if (cloudFunction.getBom() != null) {
			BillOfMaterials bom = resolveBom(cloudFunction.getBom());
			if (bom != null) {
				build.boms().add(cloudFunction.getBom());
				if (bom.getVersionProperty() != null) {
					build.properties().version(bom.getVersionProperty(), bom.getVersion());
				}
				if (!ObjectUtils.isEmpty(bom.getRepositories())) {
					bom.getRepositories().forEach((repository) -> build.repositories().add(repository));
				}
			}
		}
		if (cloudFunction.getRepository() != null) {
			build.repositories().add(cloudFunction.getRepository());
		}
		build.dependencies().remove("cloud-function");
	
<no_super_class>