Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/librarian/java/postgenerate.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ var (
// excludedBOMs is a set of artifact IDs to exclude from the generated GAPIC BOM.
excludedBOMs = map[string]bool{
"google-cloud-bigtable-deps-bom": true,
"google-cloud-bom": true,
"libraries-bom": true,
}
ignoredDirs = map[string]bool{
gapicBOM: true,
Expand Down
19 changes: 9 additions & 10 deletions internal/librarian/java/postgenerate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,15 @@ func verifyBOM(t *testing.T, path string, wantVersion string, wantDeps []bomDepe
t.Errorf("mismatch (-want +got):\n%s", diff)
}
// Verify that libraries like java-maps-places are excluded because their
// GroupID (com.google.maps) is not in the allowed groupInclusions list.
if slices.ContainsFunc(p.Dependencies, func(d bomDependency) bool {
return d.ArtifactID == "google-maps-places-bom"
}) {
t.Errorf("%s should NOT contain google-maps-places-bom", path)
}
if slices.ContainsFunc(p.Dependencies, func(d bomDependency) bool {
return d.ArtifactID == "google-cloud-bigtable-deps-bom"
}) {
t.Errorf("%s should NOT contain google-cloud-bigtable-deps-bom", path)
// GroupID (com.google.maps) is not in the allowed groupInclusions list, and
// other BOMs explicitly excluded in excludedBOMs are also absent.
for _, excluded := range []string{"google-maps-places-bom",
"google-cloud-bigtable-deps-bom", "google-cloud-bom", "libraries-bom"} {
if slices.ContainsFunc(p.Dependencies, func(d bomDependency) bool {
return d.ArtifactID == excluded
}) {
t.Errorf("%s should NOT contain %s", path, excluded)
}
}
}

Expand Down
Loading