Add description to json module actions am: 6f42cdc60f am: 0467cc50a3 am: abd0e5d94a

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2620569

Change-Id: Ife52bcb2dacd9ad66d616f75193d2a6b81a510b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Liz Kammer 2023-06-09 00:46:25 +00:00 committed by Automerger Merge Worker
commit d78d6decd1

View file

@ -2734,6 +2734,7 @@ type JSONDataSupplier interface {
type JSONAction struct {
Inputs []string
Outputs []string
Desc string
}
// JSONActionSupplier allows JSON representation of additional actions that are not registered in
@ -2778,14 +2779,18 @@ func jsonModuleWithActionsFromModuleInfo(m *moduleInfo) *JsonModule {
}
var actions []JSONAction
for _, bDef := range m.actionDefs.buildDefs {
actions = append(actions, JSONAction{
a := JSONAction{
Inputs: append(
getNinjaStringsWithNilPkgNames(bDef.Inputs),
getNinjaStringsWithNilPkgNames(bDef.Implicits)...),
Outputs: append(
getNinjaStringsWithNilPkgNames(bDef.Outputs),
getNinjaStringsWithNilPkgNames(bDef.ImplicitOutputs)...),
})
}
if d, ok := bDef.Variables["description"]; ok {
a.Desc = d.Value(nil)
}
actions = append(actions, a)
}
if j, ok := m.logicModule.(JSONActionSupplier); ok {