diff options
author | 2024-02-05 22:46:00 +0000 | |
---|---|---|
committer | 2024-02-05 22:46:00 +0000 | |
commit | 349ae8dd6bb70a53e69548f61a967791e46a3f06 (patch) | |
tree | 3dbc6b2d71676b742478e663321a6a1cf4daf4e2 /android/module.go | |
parent | bb0d5866c56a7d9393fd48f99ef2edf063f0c218 (diff) |
Automatically propagate jarjar rules for aconfig libraries
Test: treehugger
Bug: 310504781
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:97c03a6dc659102ff40793759fb3f0f18164a85b)
Merged-In: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
Change-Id: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index 5c7bbbf2b..b615ff5e8 100644 --- a/android/module.go +++ b/android/module.go @@ -34,6 +34,7 @@ import ( var ( DeviceSharedLibrary = "shared_library" DeviceStaticLibrary = "static_library" + jarJarPrefixHandler func(ctx ModuleContext) ) type Module interface { @@ -1772,6 +1773,13 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) return } + if jarJarPrefixHandler != nil { + jarJarPrefixHandler(ctx) + if ctx.Failed() { + return + } + } + m.module.GenerateAndroidBuildActions(ctx) if ctx.Failed() { return @@ -1865,6 +1873,13 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) m.variables = ctx.variables } +func SetJarJarPrefixHandler(handler func(ModuleContext)) { + if jarJarPrefixHandler != nil { + panic("jarJarPrefixHandler already set") + } + jarJarPrefixHandler = handler +} + func (m *ModuleBase) moduleInfoRegisterName(ctx ModuleContext, subName string) string { name := m.BaseModuleName() |