CL [1] added a new compilation target that uses internal API
that is now in the jdk.compiler module and is not exported
(it is subject to removal without notice in future versions of
OpenJDK). The fact that these packages are not exported suggests
that a replacement API is already available, but I don't know the
details.
For now, this CL uses javac command-line flags to export these
packages, which fixes compilation. Since the commit message from
CL [1] implies that the entire tool can be removed once bug 77284273
is fixed, a longer-term solution should not be required.
[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/745655
commit bad89e5e5b171a71e42d7c738ec97a39747e4318
Test: The following breaks before but not after this CL:
EXPERIMENTAL_USE_OPENJDK9=true make unsupportedappusage-annotation-processor
Bug: 113853502
Change-Id: I24b77af9262891428a01e2eccc18fa3a5c3b3bc9
It is sometimes useful to add comments at the top of a source file. This
patch changes hidden API list generation to ignore lines beginning with
a hash.
Note that due to the sorting constraints on hidden API lists, comments
can be only at the top of the files.
Test: m appcompat
Change-Id: I1bc6fd44d1b1f10a5adc45093d7f7ed5a0c5a54f
We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".
Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276
The processor outputs unsupportedappusage_index.csv, containing source
position info for every@UnsupportedAppUsage annotation processed. It is a
mapping of dex signature to the source postion of the annotation on that
signature. It is used as input for scripts which update the annotations.
We include a META-INF file which causes the compiler to automatically
pick up the annotation processor. Otherwise we would need to explicitly
specify the processor with a -processor flag to javac.
We create a new build target for just the @UnsupportedAppUsage annotation
and the @IntDef annotation (which it depends on) so that the processor can
also depend on that directly.
The processor only runs on a new build target framework-annotation-proc
so that it is not invoked as part of a regular build. This is done so
that we don't slow down peoples builds: Soong does not support annotation
processors when javac sharding is in use. This workaround can be removed
once b/77284273 is fixed.
Test: m framework-annotation-proc
Bug: 113853502
Change-Id: Ie9cd5a90ddf7a51f6035e849703fc39ad9127557
Generating hidden API lists has grown in complexity and the original
Makefile rule has become a bottleneck for build times. Rewrite the
logic in Python.
Bug: 113278235
Bug: 73736106
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I63f03133d70260d06c55f482b844a4980dc6f734
See build/soong/README.md for more information.
Test: cd frameworks/base/tools/aapt; mma
Test: aapt version
Change-Id: Ice97e9b32c53cfed30d68acd5717d8c66712df4c
A previous change (deee395) caused duplicate entries to be created for
entries eith entry ids greater than 0x0ff. This is because the wrong
data type was used (uint8_t instead of uint16_t). This made loading in
resources slower as well since more entries had to be iterated over.
Bug: 36051266
Test: Dumping all resources in 700 apks found in the android tree took 1
minute instead of 5 minutes. Created a test in aapt2_tests.
Change-Id: I1c3d830da517a56ac3496221dbe605c72e0c6014
The canonical location of certain parts of the source tree live in
AOSP, and should not be changed internally to avoid merge conflicts.
This initially starts with "OWNERS" files, but the hook can easily
be repeated to match any files based on file path regexes.
Bug: 113136846
Test: manual
Change-Id: I113e63b6133f20389d84ec0d6d8b81cdbdf35d38
+ Only record eventual failure after the retries to get a accurate log loss count.
+ Record all types of failures which lead to log loss
+ Change the timestamp from elapsedRealtime to wallclock time for easier debugging server side
+ Also log the count too.
Bug: 80538532
Test: manually tested
Change-Id: I4fcccae3fa39c9e280a842e27c6432bb0a090b85
Many google3 apps using lemon resource filtering had difficulty
converting to aapt2. AAPT2 never set the name of the ResTable_map name
value mapping.
Bug: 78472540
Test: blaze build java/com/google/android/apps/gmail:Gmail_go_release
and checking that all array resources are present
Change-Id: I3d253a4c52c6100085e4c1083f4c36a943f11c76
Added a --zip flag similar to --dir that allows resources to be passed
into "aapt2 compile" using a zip file.
Also refactored Compile.cpp to be easier to mock and test in the future.
Bug: 74574557
Test: aapt2_tests
Change-Id: Idb90cb97e23a219525bdead38220cbf7bc6f3cab