Convert cc aidl to rule builder

This fixes an incremental build issue where we didn't clean up old aidl
header files (or necessarily notice that they were updated).

We do this by declaring the header files as outputs in the build graph,
but this means that the src file name needs to be convertible to the
aidl package name, as that's how the header file paths are created. In
many cases, filegroups can be used to strip path prefixes from the aidl
files.

Bug: 112114177
Test: treehugger
Change-Id: If534ff3dbfac329dea9a7402e30be74495754160
diff --git a/android/rule_builder.go b/android/rule_builder.go
index 4a3b022..8d7e74b 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -525,6 +525,15 @@
 	return c
 }
 
+// OutputDir adds the output directory to the command line. This is only available when used with RuleBuilder.Sbox,
+// and will be the temporary output directory managed by sbox, not the final one.
+func (c *RuleBuilderCommand) OutputDir() *RuleBuilderCommand {
+	if !c.sbox {
+		panic("OutputDir only valid with Sbox")
+	}
+	return c.Text("__SBOX_OUT_DIR__")
+}
+
 // DepFile adds the specified depfile path to the paths returned by RuleBuilder.DepFiles and adds it to the command
 // line, and causes RuleBuilder.Build file to set the depfile flag for ninja.  If multiple depfiles are added to
 // commands in a single RuleBuilder then RuleBuilder.Build will add an extra command to merge the depfiles together.