diff options
author | Liz Kammer <eakammer@google.com> | 2021-02-17 10:17:28 -0500 |
---|---|---|
committer | Liz Kammer <eakammer@google.com> | 2021-02-23 10:58:57 -0500 |
commit | ea6666fba98c8d49789059ba32feae29621deb3a (patch) | |
tree | 55299e5cdb653659ea26212dd3eae9417f3c0cfd /sh | |
parent | ece454400d4f40beb75e8d1773f3d9d684ff6608 (diff) | |
download | soong-ea6666fba98c8d49789059ba32feae29621deb3a.tar.gz |
Move bazel.Properties to a BazelModuleBase
This allows more direct access to the bazel label and whether the module
is bp2build available.
Test: go test *
Change-Id: I23375835d20fa53d7d94127b2dc2d5bb20487bfb
Diffstat (limited to 'sh')
-rw-r--r-- | sh/sh_binary.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 58f8cf69e..5aa245090 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -84,9 +84,6 @@ type shBinaryProperties struct { // Make this module available when building for recovery. Recovery_available *bool - - // Properties for Bazel migration purposes. - bazel.Properties } type TestProperties struct { @@ -132,6 +129,7 @@ type TestProperties struct { type ShBinary struct { android.ModuleBase + android.BazelModuleBase properties shBinaryProperties @@ -427,6 +425,7 @@ func (s *ShTest) AndroidMkEntries() []android.AndroidMkEntries { func InitShBinaryModule(s *ShBinary) { s.AddProperties(&s.properties) + android.InitBazelModule(s) } // sh_binary is for a shell script or batch file to be installed as an @@ -504,7 +503,7 @@ func BazelShBinaryFactory() android.Module { func ShBinaryBp2Build(ctx android.TopDownMutatorContext) { m, ok := ctx.Module().(*ShBinary) - if !ok || !m.properties.Bazel_module.Bp2build_available { + if !ok || !m.ConvertWithBp2build() { return } |