The return value of ClassItem.allInterfaces will sometimes include the
interface itself (e.g.
android.accessibilityservice.BrailleDisplayController). It is unclear
when this happens; it doesn't happen for the unit test.
Update the logic to record the interfaces for a class to filter out
interfaces named the same as the class.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I8d93c230dfedde30e8d43fefd560a47944085d3a
Extend ClassSymbol with a list of the interfaces that class implements.
This will be used in a follow-up CL to improve the logic that checks if
a class member exists in the api-versions.xml data.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I4db7ff47c3ce40ca892cb872810dd559426dfcb8
Change Symbol from a wrapper around a String to a more fleshed out data
class; symbols now encode if they represent a class, or a class member
(including a reference to the containing class).
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh # with and without this CL; the output should be the same
Change-Id: I003535c721c45d559d00fb3e008325e1db0e18c0
The constructor of a nested class is represented as follows in
api-versions.xml:
<class name="android/Clazz$Foo$Bar" since="1">
<method name="<init>()V"/>
</class>
The nested dollar signs are not replaced by forward slashes before the
parsing logic uses `split("/")` to find the name of the inner-most
class, incorrectly resulting in `Class$Foo$Bar` instead of `Bar`. Fix
this by immediately replacing dollar signs with forward slashes after
extracting the package and class.
Also clean up the following call of `Symbol.create`.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8c0619faae90ded7eb14dcc20ecb94a086a1c764
Previously, the check-flagged-apis.sh script used `api-versions.xml`
for `module-lib` and `system-server` which did not include the
latest up-to-date information about updatable modules or historical
information about sdk extensions which lead to false positives for
APIs from those updatable modules. This changes switches to use the
`api-versions.xml` produced by the new `api_versions_*_complete`
modules which does include that information.
Bug: 337836752
Test: Run script before and after applying this change to make sure
that flagged APIs from updatable modules are no longer
reported as missing.
Change-Id: If09e89a4595a19d9f00390fb5fbd24330ec11be5
Instead of building the entire SDK, explicitly build the
api-versions.xml files.
Bug: 334870672
Test: croot && build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: Ib165c0acd4766ad3000aaf17220050d5e66ddf2c
RELEASE_APEX_CONTRIBUTIONS_ART provides a similar functionality, and
also allows selection of a specific art prebuilt if multiple art
prebuilts exists in the tree
`art_module.source_build` was also previously used to conditionally
disable the source soong modules of art/, but this conditional disabling
has been removed with r.android.com/3045792
Bug: 308188056
Test: presubmits
Test: lunch cf_x86_64_phone-trunk_staging-userdebug; mmma art
Test: git_master-art:art-host-x86_64,art-target-arm64,mainline_modules
https://android-build.corp.google.com/builds/abtd/run/L30200030003163172
Test: git_master-art-host:art-build,art-gtest,art-test,art-preopt
https://android-build.corp.google.com/builds/abtd/run/L07600030003164399
Change-Id: Idbb129d2ec304d5320754cd61d40e10e5c7d5414
Add a test to verify that the parameters passed from the
envsetup.sh function are compatible with the actual tool
event logger implementation.
Note that this change adds support for extra logger arguments.
This enables calling the real logger binary with a 'dry run'
flag to avoid actual logging during test execution.
Test: atest rul_tool_with_logging_test
Bug: 331638854
Change-Id: I6b280c53baae03477d4f52f0084efb1f500bd5d0
If RELEASE_BUILD_FLAGS_IN_PROTOBUF is False, then the results from
out/release-config are ignored and we do the old processing.
The following additional logic all goes away once the migration to protobuf
is finished.
- If we found .textproto files that don't have corresponding .mk files,
we require protobuf.
- If we found .mk files that don't have corresponding .textproto files,
we require legacy (make) processing.
- If PRODUCT_RELEASE_CONFIG_MAPS specifies .textproto files, we require
protobuf.
In order to further isolate migration, the choice can be determined on a
release-config by release-config basis. in each release config
directory, we look for:
- `build_config/DEFAULT=proto`
- `build_config/DEFAULT=make`
- `build_config/${TARGET_RELEASE}=proto`
- `build_config/${TARGET_RELEASE}=make`
The last such file found determines which code path is used.
Bug: 328495189
Test: manual, TH
Change-Id: I1d84db76b157082fc7db1b3cb7c9afe8cdf46cbf
The path to the generated API signature files used with --api-signature
in the check-flagged-apis.sh script are different based on the lunch
target used: sometimes it's under $ANDROID_PRODUCT_OUT, other times
under out/target/product/mainline_x86.
Teach check-flagged-apis.sh to dynamically find the correct path by
querying ninja.
Bug: 334870672
Test: croot && build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I1b0b41ef3ad1bc7113a3b31323d81251e7e65933
Switch the internal format to represent Symbols to (something close to)
the format described in section 4.3.2 of the JVM spec, i.e.
com/android/SomeClass/someMethod(II[Ljava/lang/String;)Z
This will make parsing method parameters from api-versions.xml easier,
as that file already uses this format, and converting API signature
files to the same format is less painful than going in the other
direction.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I1e1fb8fe208cd51cce2cc129f5aa1cb495672c16
LOCAL_SOONG_LOGTAGS_FILES is similar to LOCAL_LOGTAGS_FILES but it uses
full paths rather than relative paths, to correctly support Soong's
`android:"path"` which may produce paths outside module directories.
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: I129b96f3e06036ded76d2657e25e895f8c946cfb
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags
Change-Id: Iae336a05bb2f27564b0bf8d4ea3753a30be89e90
kotlin-stdlib is included transitively as a library jar by way of
androidx.annotations, which means we cannot ensure associated classes
are discarded by R8. Disable the related `-checkdiscard` proguard rule
until that inclusion is resolved, avoiding spurious warnings in build
output.
Bug: 302383328
Test: m
Flag: NA
Change-Id: I7514e6841735e95e1a16d42d6a6e134103ecb108
One use case for this is to select go prebuilt apexes when building go
devices.
Bug: 338002385
Test: presubmits
Test: verified that this map shows up in `get_build_var
PRODUCT_RELEASE_CONFIG_MAPS` of a go device
Change-Id: I5505c581597bbd5a4e5f8fc6cd69987f67f0adb6
This behavior of "stealing" values from parent makefiles is needed to
match make. We already had similar behavior for list variables via
the __move_items function, but were missing it for single value
variables.
Test: ./out/rbcrun -mode rbc ./build/make/tests/run.rbc
Change-Id: Ib320b9b1cce0224184f585c7a391be1b5353b440