@Test void build() throws Exception { assertThat(registry.getExtensions()).isNotEmpty(); assertThat(registry.getPlatforms()).isNotEmpty(); if (Boolean.getBoolean("generateTmpRegistry")) { ObjectMapper mapper = new ObjectMapper() .setSerializationInclusion(JsonInclude.Include.NON_NULL) .setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE); mapper.writeValue(new java.io.File("/tmp/registry.json"), registry); } }
public Registry build() { for (Map.Entry<ArtifactCoordsTuple, ModifiableExtensionRelease> entry : releases.entrySet()) { ArtifactCoordsTuple tuple = entry.getKey(); ModifiableExtensionRelease extensionReleaseBuilder = entry.getValue(); ArtifactKey key = tuple.getCoords().getId(); ModifiableExtension extensionBuilder = extensions.get(key); extensionBuilder.addReleases(extensionReleaseBuilder.toImmutable()); } extensions.values().stream().map(ModifiableExtension::toImmutable).forEach(registryBuilder::addExtensions); platforms.values().stream().map(ModifiablePlatform::toImmutable).forEach(registryBuilder::addPlatforms); return registryBuilder.build(); }
RegistryBuilder implements IndexVisitor { public Registry build() { for (Map.Entry<ArtifactCoordsTuple, ModifiableExtensionRelease> entry : releases.entrySet()) { ArtifactCoordsTuple tuple = entry.getKey(); ModifiableExtensionRelease extensionReleaseBuilder = entry.getValue(); ArtifactKey key = tuple.getCoords().getId(); ModifiableExtension extensionBuilder = extensions.get(key); extensionBuilder.addReleases(extensionReleaseBuilder.toImmutable()); } extensions.values().stream().map(ModifiableExtension::toImmutable).forEach(registryBuilder::addExtensions); platforms.values().stream().map(ModifiablePlatform::toImmutable).forEach(registryBuilder::addPlatforms); return registryBuilder.build(); } }
RegistryBuilder implements IndexVisitor { public Registry build() { for (Map.Entry<ArtifactCoordsTuple, ModifiableExtensionRelease> entry : releases.entrySet()) { ArtifactCoordsTuple tuple = entry.getKey(); ModifiableExtensionRelease extensionReleaseBuilder = entry.getValue(); ArtifactKey key = tuple.getCoords().getId(); ModifiableExtension extensionBuilder = extensions.get(key); extensionBuilder.addReleases(extensionReleaseBuilder.toImmutable()); } extensions.values().stream().map(ModifiableExtension::toImmutable).forEach(registryBuilder::addExtensions); platforms.values().stream().map(ModifiablePlatform::toImmutable).forEach(registryBuilder::addPlatforms); return registryBuilder.build(); }  }
RegistryBuilder implements IndexVisitor { public Registry build() { for (Map.Entry<ArtifactCoordsTuple, ModifiableExtensionRelease> entry : releases.entrySet()) { ArtifactCoordsTuple tuple = entry.getKey(); ModifiableExtensionRelease extensionReleaseBuilder = entry.getValue(); ArtifactKey key = tuple.getCoords().getId(); ModifiableExtension extensionBuilder = extensions.get(key); extensionBuilder.addReleases(extensionReleaseBuilder.toImmutable()); } extensions.values().stream().map(ModifiableExtension::toImmutable).forEach(registryBuilder::addExtensions); platforms.values().stream().map(ModifiablePlatform::toImmutable).forEach(registryBuilder::addPlatforms); return registryBuilder.build(); }  @Override void visitPlatform(QuarkusPlatformDescriptor platform); @Override void visitExtension(Extension extension, String quarkusCore); Registry build(); }
RegistryBuilder implements IndexVisitor { public Registry build() { for (Map.Entry<ArtifactCoordsTuple, ModifiableExtensionRelease> entry : releases.entrySet()) { ArtifactCoordsTuple tuple = entry.getKey(); ModifiableExtensionRelease extensionReleaseBuilder = entry.getValue(); ArtifactKey key = tuple.getCoords().getId(); ModifiableExtension extensionBuilder = extensions.get(key); extensionBuilder.addReleases(extensionReleaseBuilder.toImmutable()); } extensions.values().stream().map(ModifiableExtension::toImmutable).forEach(registryBuilder::addExtensions); platforms.values().stream().map(ModifiablePlatform::toImmutable).forEach(registryBuilder::addPlatforms); return registryBuilder.build(); }  @Override void visitPlatform(QuarkusPlatformDescriptor platform); @Override void visitExtension(Extension extension, String quarkusCore); Registry build();  }