Add description to json module actions am: 6f42cdc60f
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2620569 Change-Id: Ie0aa125f3c1f6966d83ab63f8ed9c0f0e222101c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
0467cc50a3
1 changed files with 7 additions and 2 deletions
|
@ -2734,6 +2734,7 @@ type JSONDataSupplier interface {
|
||||||
type JSONAction struct {
|
type JSONAction struct {
|
||||||
Inputs []string
|
Inputs []string
|
||||||
Outputs []string
|
Outputs []string
|
||||||
|
Desc string
|
||||||
}
|
}
|
||||||
|
|
||||||
// JSONActionSupplier allows JSON representation of additional actions that are not registered in
|
// JSONActionSupplier allows JSON representation of additional actions that are not registered in
|
||||||
|
@ -2778,14 +2779,18 @@ func jsonModuleWithActionsFromModuleInfo(m *moduleInfo) *JsonModule {
|
||||||
}
|
}
|
||||||
var actions []JSONAction
|
var actions []JSONAction
|
||||||
for _, bDef := range m.actionDefs.buildDefs {
|
for _, bDef := range m.actionDefs.buildDefs {
|
||||||
actions = append(actions, JSONAction{
|
a := JSONAction{
|
||||||
Inputs: append(
|
Inputs: append(
|
||||||
getNinjaStringsWithNilPkgNames(bDef.Inputs),
|
getNinjaStringsWithNilPkgNames(bDef.Inputs),
|
||||||
getNinjaStringsWithNilPkgNames(bDef.Implicits)...),
|
getNinjaStringsWithNilPkgNames(bDef.Implicits)...),
|
||||||
Outputs: append(
|
Outputs: append(
|
||||||
getNinjaStringsWithNilPkgNames(bDef.Outputs),
|
getNinjaStringsWithNilPkgNames(bDef.Outputs),
|
||||||
getNinjaStringsWithNilPkgNames(bDef.ImplicitOutputs)...),
|
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 {
|
if j, ok := m.logicModule.(JSONActionSupplier); ok {
|
||||||
|
|
Loading…
Reference in a new issue