This is needed to allow monolitic gapic-generator and microgenerators coexist during transition period.
To plug a microgenerator:
1) Add corresponding rules bidnings under `switched_rules_by_language` in repository_rules.bzl:
rules["go_gapic_library2"] = _switch(
go and grpc and gapic,
"@gapic_generator_go//rules_go_gapic/go_gapic.bzl",
"go_gapic_library",
)
2) Import microgenerator in WORKSPACE (the above example assumes that the generator was imported under name "gapic_generator_go").
3) To migrate an API from monolith to micro generator (this is done per API and per language) modify the corresponding load statement in the API's BUILD.bazel file. For example, for the example above, to migrate to go microgenerator modify the go-specific load statement in BUILD.bazel file of a specific API (which you want to migrate) to the following:
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
go_gapic_library = "go_gapic_library2",
"go_proto_library",
"go_test",
)
PiperOrigin-RevId: 286065440
Also configure python build for the following clients as an example:
diaglogflow/v2
language/v1
texttospeech/v1
firestore/v1beta1
pubsub/v1
PiperOrigin-RevId: 279406526