compliance package for license metadata: dumpgraph

package to read, consume, and analyze license metadata and dependency
graph.

Includes testdata/ and the the below command-line tool:

dumpgraph outputs edges of the graph as "target dependency annotations"

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ...

where ... is the path to the .meta_lic file for the system image. In my
case if

$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)

... can be expressed as:

${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic

Change-Id: I5fe57d361da5155dbcb2c0d369626e9200c9d664
diff --git a/tools/compliance/condition.go b/tools/compliance/condition.go
index e6d23ef..b5c8cec 100644
--- a/tools/compliance/condition.go
+++ b/tools/compliance/condition.go
@@ -77,6 +77,15 @@
 	return sb.String()
 }
 
+// Names returns the list of the conditions' names.
+func (cl ConditionList) Names() []string {
+	result := make([]string, 0, len(cl))
+	for _, lc := range cl {
+		result = append(result, lc.name)
+	}
+	return result
+}
+
 // HasByName returns true if the list contains any condition matching `name`.
 func (cl ConditionList) HasByName(name ConditionNames) bool {
 	for _, lc := range cl {