Add support to build a full _book.yaml file for DAC reference.
This creates a new version of writeYamlTree() to reproduce the nav
structure used on d.android.com with all API links.
Previously, we generated a book.yaml for dac that included only the
package names. All classes/interfaces were added to the nav with JS.
Although Doclava already included an option to generate the complete
book.yaml file (used by other javadoc projects for DevSite), this
book.yaml file did not organize pages by type (classes, interfaces, etc)
and it put nested classes behind a zippy, below the parent class.
Whereas we prefer to show all classes within a package as siblings.
So this new writeYamlTree2() method uses the same Node list used by the
original JS implementation, but with new rendering methods to create
a yaml structure instead of a JS array for all API links.
To use this new book.yaml format, the doclava command must include the
`yamlV2` option.
Then, you'll actually receive 2 yaml files: the traditional "v1" yaml
file and the new v2 yaml file prefixed with "NEW" in the filename. This
is particularly important for DAC right now so that we can submit this
change to Git without affecting the expected yaml file for the site.
To support the "Irina" version of DAC, we simply rename the "NEW" file
to replace the legacy version.
This also uses the new book.yaml property "version_added" to specify
the "since" API level for each API (instead of the "status_text"
property that applied as a CSS class).
Once we migrate fully to Irina, we can disable this dual output.
Example output is shown in http://cl/187393231
bug: b/69845924, b/70844489
test: make ds-docs
Change-Id: I6e98ee05bb406863a7c60e6bfe56ca745ac83f10
3 files changed