Include TARGET_RELEASE in soong metrics
While we explicitly do not tell the build engine the value of
TARGET_RELEASE, we can include it in the build metrics.
Bug: None
Test: Manual
Change-Id: I92e4b21b8c93e1039d405d29eaebfa3b89a57103
diff --git a/ui/metrics/metrics.go b/ui/metrics/metrics.go
index 4a275a8..8d29cfc 100644
--- a/ui/metrics/metrics.go
+++ b/ui/metrics/metrics.go
@@ -161,7 +161,7 @@
}
// SetMetadataMetrics sets information about the build such as the target
-// product, host architecture and out directory.
+// product, host architecture and out directory. May be called multiple times.
func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
for k, v := range metadata {
switch k {
@@ -171,6 +171,8 @@
m.metrics.PlatformVersionCodename = proto.String(v)
case "TARGET_PRODUCT":
m.metrics.TargetProduct = proto.String(v)
+ case "TARGET_RELEASE":
+ m.metrics.TargetRelease = proto.String(v)
case "TARGET_BUILD_VARIANT":
switch v {
case "user":