Create api_domain module type and its bp2build converter
This module does not have any build actions in Soong yet. It will be converted to a Bazel target using bp2build, and API export will be run on the generated Bazel target Test: go test ./bp2build Test: TH Change-Id: I76df32bd9f23b60e746b2700af07668a2ed74844
This commit is contained in:
@@ -147,16 +147,6 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
apiContributionSuffix = ".contribution"
|
||||
)
|
||||
|
||||
// apiContributionTargetName returns the name of the cc_api(headers|contribution) bp2build target of ndk modules
|
||||
// A suffix is necessary to prevent a name collision with the base ndk_(library|header) target in the same bp2build bazel package
|
||||
func apiContributionTargetName(moduleName string) string {
|
||||
return moduleName + apiContributionSuffix
|
||||
}
|
||||
|
||||
// TODO(b/243196151): Populate `system` and `arch` metadata
|
||||
type bazelCcApiHeadersAttributes struct {
|
||||
Hdrs bazel.LabelListAttribute
|
||||
@@ -179,7 +169,7 @@ func createCcApiHeadersTarget(ctx android.TopDownMutatorContext, includes []stri
|
||||
Include_dir: include_dir,
|
||||
}
|
||||
ctx.CreateBazelTargetModule(props, android.CommonAttributes{
|
||||
Name: apiContributionTargetName(ctx.ModuleName()),
|
||||
Name: android.ApiContributionTargetName(ctx.ModuleName()),
|
||||
}, attrs)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user