Start adding build rules for ravenwood
- Add "framework-minus-apex.ravenwood".
- Update the behavior of: --default-throw:
- Now this will "keep" the subject classes and fields.
- When a 'throw' directive is specified on a static initializer,
it's now handled as 'keep', because otherwise the class
wouldn't be usable.
Test: ./scripts/run-all-tests.sh
Test: m framework-minus-apex.ravenwood
Bug: 292141694
Change-Id: If4d650dc175a5a78cf8844dfed2217c19f2d5790
diff --git a/ravenwood/ravenwood-standard-options.txt b/ravenwood/ravenwood-standard-options.txt
new file mode 100644
index 0000000..6e1384f
--- /dev/null
+++ b/ravenwood/ravenwood-standard-options.txt
@@ -0,0 +1,37 @@
+# File containing standard options to HostStubGen for Ravenwood
+
+--debug
+
+# Keep all classes / methods / fields, but make the methods throw.
+--default-throw
+
+# Uncomment below lines to enable each feature.
+# --enable-non-stub-method-check
+
+#--default-method-call-hook
+# com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall
+#--default-class-load-hook
+# com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded
+
+# Standard annotations.
+# Note, each line is a single argument, so we need newlines after each `--xxx-annotation`.
+--keep-annotation
+ android.ravenwood.annotations.RavenwoodKeep
+
+--keep-class-annotation
+ android.ravenwood.annotations.RavenwoodWholeClassKeep
+
+--throw-annotation
+ android.ravenwood.annotations.RavenwoodThrow
+
+--remove-annotation
+ android.ravenwood.annotations.RavenwoodRemove
+
+--substitute-annotation
+ android.ravenwood.annotations.RavenwoodSubstitute
+
+--native-substitute-annotation
+ android.ravenwood.annotations.RavenwoodNativeSubstitutionClass
+
+--class-load-hook-annotation
+ android.ravenwood.annotations.RavenwoodClassLoadHook