bp2build: Refactor CreateBazelTargetModule API.

This CL refactors the CreateBazelTargetModule API to minimize boilerplate, and to establish a well defined function signature for the expected metadata about a BazelTargetModule.

Test: soong tests

Test: TH
Change-Id: I474ff5a2b0db8deeed49ba4ca73b416ccb494fdd
This commit is contained in:
Jingwen Chen
2021-02-05 03:01:50 -05:00
parent b7eab01167
commit 1fd14691dd
5 changed files with 67 additions and 38 deletions

View File

@@ -29,6 +29,8 @@ type Properties struct {
// BazelTargetModuleProperties contain properties and metadata used for
// Blueprint to BUILD file conversion.
type BazelTargetModuleProperties struct {
Name *string
// The Bazel rule class for this target.
Rule_class string