Skip to content
Snippets Groups Projects
user avatar
Tor Norbye authored
First, this CL makes it easier to convert between v1 and v2 versions
of the signature files:

--convert-to-v1 <sig> <sig> Reads in the given signature file and
                            writes it out as a signature file in the
                            original v1/doclava format.

--convert-to-v2 <sig> <sig> Reads in the given signature file and
                            writes it out as a signature file in the
                            new signature format, v2.

--convert-new-to-v2 <old> <new> <sig> Reads in the given old and new
                            api files, computes the difference, and
                            writes out only the new parts of the API
                            in the v2 format.

Second, this cleans up a few issues around compatibility flag handling
(a few things were tweaked by options instead of compatibility flag),
and more importantly, make sure that we enable kotlin-style-nulls
based on the API file header format version, not (just) the command
line options.  Also, during signature file parsing, treat interfaces
as implicitly abstract.  This is important during JDiff export. This
CL also emulates a few more compatibility behaviors with doclava's
JDiff export.

Third, parameter names should not be included in v1 files (they
accidentally were, though only for Kotlin since Java normally does not
have parameter names, unless specified with as special annotation).

Fourth, this CL removes a few unnecessary entries from signature
files: those that differ only by final or deprecated from the parent
signature where the surrounding class is final or deprecated
(b/122358225), or where they differ in synchronization.

Finally, this CL fixes some issues around the handling of type erasure
in throws statements (fixes b/110302703), and removes some special
cases of the Android API which is no longer necessary and removes some
unused compat code (e.g. around native and strictfp.)

Test: Unit test updated
Change-Id: I7b7023149ccbb90b8d30e095c713af9957105023
942042f9