Builds CTS sources in standalone build

Minor change to spot refactoring bugs earlier.
Builds the CTS code also in standalone builds, without running it.
Also makes the perfetto_cts_deps target auto-generated, to keep
deps in sync.

Change-Id: I9be6577f8732dd17e8940d1d296891e87459cc62
diff --git a/BUILD.gn b/BUILD.gn
index daf73a9..7f46e10 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -125,6 +125,12 @@
   ]
 }
 
+# The CTS code is built (but not ran) also in standalone builds. This is to
+# catch refactoring breakages earlier without having to wait for treehugger.
+if (is_android && (perfetto_build_standalone || perfetto_build_with_android)) {
+  all_targets += [ "test/cts:perfetto_cts_deps" ]
+}
+
 group("all") {
   testonly = true  # allow to build also test targets
   deps = all_targets
@@ -194,7 +200,7 @@
   # on how to use the Perfetto Client API from the android tree.
   static_library("libperfetto_client_experimental") {
     complete_static_lib = true
-    deps = [
+    public_deps = [
       "gn:default_deps",
       "src/tracing",
       "src/tracing:client_api",