Retrace script for automatically retracing R8 builds in platform.

User documentation at go/retraceme

Bug: 204293621
Test: atest --host r8retrace-check-retraced-stacktrace
Change-Id: I595d5c3954d5e06c43092f11fcd8e6c917e1fea3
diff --git a/Android.bp b/Android.bp
index 3ace361..8078b69 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,18 @@
+//
+// Copyright (C) 2021 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package {
     default_applicable_licenses: ["prebuilts_r8_license"],
 }
@@ -54,6 +69,19 @@
     static_libs: ["r8"],
 }
 
+java_binary_host {
+    name: "retrace",
+    main_class: "com.android.tools.r8.retrace.RetraceWrapper",
+    srcs: ["src/com/android/tools/r8/retrace/RetraceWrapper.java"],
+    static_libs: ["r8"],
+}
+
+java_binary_host {
+    name: "extractmarker",
+    main_class: "com.android.tools.r8.ExtractMarker",
+    static_libs: ["r8"],
+}
+
 java_import_host {
     name: "r8",
     jars: ["r8.jar"],