[ravenwood] Add a tool to convert text policy to annotations
- Add a new command "ravenhelper", which performs different functions
depending on the first argument ("subcommand") just like the git command.
- For now, it has one subcommand "pta" -- policy-to-annotation, which
reads the policy file and add corresponding annotations to the java
source files.
- This will also add classes to ravenwood-annotation-allowed-classes.txt
as needed.
- Use the f/b/r/scripts/pta-framework.sh script to run it.
- For safety and easier testing/debugging, the command actually won't
directly update any files. Instead, it'll generate a shell script which
does so, using sed(1).
Here's an example script: https://paste.googleplex.com/6561708886458368?raw
Bug: 388607679
Flag: EXEMPT host test change only
Test: ./frameworks/base/ravenwood/scripts/pta-framework.sh, and
manually check /tmp/pta.sh
Change-Id: I5dcf078ca47eb373bcaf435ef133335f44bce6b3
13 files changed