Add preview level support to api.bzl.
The current implementation was also somewhat incomplete compared to the
Soong version, e.g. it didn't use the finalized codenames.
I'd suggest reading the unit tests first to understand the expected
parse results.
Fixes: 271424224
Bug: 271424349
Test: new AndroidManifest.xml diff test to show target sdk version being set correctly to 10000 (among other things)
Test: new unittest for the api parser
Change-Id: I467cdda71d766327e25c3d1db0df47db6eb2502b
6 files changed