Add a soong wrapper for R8's tracereferences

Add a new traceReferences rule that wraps the base R8 tracereferences
command. This allows generating a set of keep rules after tracing
references from a given set of sources onto a given target jar.

This will be used to keep hidden/unannotated members of optimzed
libraries that may be referenced by other bundled libraries on the
platform.

Bug: 212737576
Test: m
Flag: EXEMPT basic soong rule addition
Change-Id: I92cbe8839ce68056311c7c38de181f2e5f7cb775
diff --git a/java/config/config.go b/java/config/config.go
index 71025de..fdb8d78 100644
--- a/java/config/config.go
+++ b/java/config/config.go
@@ -173,6 +173,7 @@
 	pctx.HostBinToolVariable("R8Cmd", "r8")
 	pctx.HostBinToolVariable("ExtractR8RulesCmd", "extract-r8-rules")
 	pctx.HostBinToolVariable("ResourceShrinkerCmd", "resourceshrinker")
+	pctx.HostBinToolVariable("TraceReferencesCmd", "tracereferences")
 	pctx.HostBinToolVariable("HiddenAPICmd", "hiddenapi")
 	pctx.HostBinToolVariable("ExtractApksCmd", "extract_apks")
 	pctx.VariableFunc("TurbineJar", func(ctx android.PackageVarContext) string {