Keep package access members in TOC files

In some cases we have multiple libraries with the same package name
(particularly test+non-test). If one of these depends on the other and
refers to package-private stuff in the second, then it should be rebuilt
if the signature of package-private stuff is changed. To ensure that
happens, the TOC file must include the signatures of package-private
members.

Review URL: https://codereview.chromium.org/161773002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250956 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
cjhopman@chromium.org 2014-02-13 05:08:36 +00:00
Родитель a5aed47a24
Коммит a028c8402b
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -7,8 +7,10 @@
"""Creates a TOC file from a Java jar.
The TOC file contains the non-package API of the jar. This includes all
public/protected classes/functions/members and the values of static final
variables. Some other information (major/minor javac version) is also included.
public/protected/package classes/functions/members and the values of static
final variables (members with package access are kept because in some cases we
have multiple libraries with the same package, particularly test+non-test). Some
other information (major/minor javac version) is also included.
This TOC file then can be used to determine if a dependent library should be
rebuilt when this jar changes. I.e. any change to the jar that would require a
@ -38,7 +40,7 @@ def GetClassesInZipFile(zip_file):
def CallJavap(classpath, classes):
javap_cmd = [
'javap',
'-protected', # In reality both public & protected.
'-package', # Show public/protected/package.
# -verbose is required to get constant values (which can be inlined in
# dependents).
'-verbose',