OSDN Git Service

Lint to identify "deprecated at birth" APIs.
authorJeff Sharkey <jsharkey@android.com>
Wed, 11 Apr 2018 16:05:44 +0000 (10:05 -0600)
committerJeff Sharkey <jsharkey@android.com>
Wed, 11 Apr 2018 16:43:16 +0000 (10:43 -0600)
commit8b141b9db00aa95a9610770b1a7757fb155d097c
treed6a5d0cc71f8cb423fb68a644183743579ea0b13
parent997e7b7ea43282a9216d205ec291358dfa01136a
Lint to identify "deprecated at birth" APIs.

When API council requests changes, teams regularly perform the
requested refactoring, but simply mark the old APIs as @Deprecated
without @removed, due to internal users.

As part of finalizing an SDK, we should ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.  This extension to the lint script makes it easy
to identify these cases.

$ python tools/apilint/apilint.py --show-deprecations-at-birth \
        api/current.txt ../../prebuilts/sdk/api/28.txt

$ python tools/apilint/apilint.py --show-deprecations-at-birth \
        api/system-current.txt ../../prebuilts/sdk/system-api/28.txt

Bug: 77588754
Test: manual inspection
Change-Id: Ie9658006bb08f780bee0e503481d3bafec1038a1
tools/apilint/apilint.py