This CL merges the biggest three metalava invocations --
stub and signature file generation, api lint, and "check released" --
into one call.
For each of the existing separate rules for api lint and check released this change:
1) Stopped creating a separate rule containing its own metalava invocation.
2) Moved the code for creating the rule earlier so it can add extra flags to the combined metalava command.
3) Moved the message handling into metalava, allowing the message to be passed in.
4) Added a flag to record whether the specific check was needed so that you can separate the timestamp file creation out to run after the merged metalava command.
A couple of minor bug fixes and clarifications.
Bug: 151160048
Test: "m" and treehugger
Test: Apply https://android-review.googlesource.com/c/platform/frameworks/base/+/1295541 and run `NINJA_ARGS="-k 999" m checkapi`
-> Make sure there are 4 kinds of lint failures ("AddedFinal" and "VisiblySynchronized") with the valid error messages, from:
- api-stubs-docs
- system-api-stubs-docs
- test-api-stubs-docs
- module-lib-api-
Test: Run the 4 cp commands shown by lint
-> Make sure the following 4 baseline files are updated:
frameworks/base/api/lint-baseline.txt
frameworks/base/api/module-lib-lint-baseline.txt
frameworks/base/api/system-lint-baseline.txt
frameworks/base/api/test-lint-baseline.txt
Test: Then run `NINJA_ARGS="-k 999" m checkapi` again.
-> Make sure the API lint errors are gone
-> Make sure "api-stubs-docs" shows the "You have tried to change the API from what has been
previously released in ..." error. (because of "AddedFinal")
-> Make sure it the other 3 API surfaces show the "You have tried to change the API from
what has been previously approved" error.
Test: Remove "final" from Intent.java and run "NINJA_ARGS="-k 999" m checkapi" again.
-> This time, all the 4 API surfaces say "You have tried to change the API from
what has been previously approved" error."
Test: Run the 4 "make *-update-current-api" commands shown in the above errors and "NINJA_ARGS="-k 999" m checkapi"
-> The exact command is:
$ make \
module-lib-api-update-current-api \
api-stubs-docs-update-current-api \
test-api-stubs-docs-update-current-api \
system-api-stubs-docs-update-current-api
-> Make sure frameworks/base/api/*-current.txt are properly updated.
Test: Run "m update-api"
-> Make sure no text signature files get updated.
Test: Run "m droid".
-> Make sure everything builds fine.
Change-Id: Ia1a5510b57d58748b4655473d4585636deb7f45e
Merged-In: Ia1a5510b57d58748b4655473d4585636deb7f45e
@TestApi does not have stability requirements, so we shouldn't be
checking its compatibility with the last released version.
This CL removes the expectation that a test-removed.txt is checked in
for each module during finalization.
Bug: 155197156
Test: m (with SDK 30 imported)
Change-Id: Ib3f671493f1d230116bec51b884e8072643b10d4
Merged-In: Ib3f671493f1d230116bec51b884e8072643b10d4
(cherry picked from commit 6bf8e415a50826a378cc58aba87854f52c9f1d32)
This makes prebuilt_sdk look for and create modules in the module-lib
and system-server subdirs too, e.g.:
framework-wifi.api.module-lib.latest
Bug: 149293194
Test: follow-up change
Change-Id: Idbded6b633315034e669e9c5dd2bd30725d5c76b
Merged-In: Idbded6b633315034e669e9c5dd2bd30725d5c76b
This is a follow-up for https://r.android.com/1292915, which introduced
two-column format for the components of the boot jar list. This CL
fixes build failure for the coverage build.
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
Change-Id: Ib8b156bf81943fe07084cbce5e7e9bf70e759a5d
Soong was referencing the baseline file regardless of whether it was
valid or not.
Also update the lint message to match the one metalava itself prints,
which only suggests whitelisting the error if it's not possible to fix
it properly.
Bug: 154616909
Test: m (with lint error)
Change-Id: I4c6ec327a59aefe74825b4c4719393dd267ba3aa
Merged-In: I4c6ec327a59aefe74825b4c4719393dd267ba3aa
(cherry picked from commit 34ced82d2a)
This makes it consistent with android_app. Also, most android_app_import
modules with JNI libs target a single arch.
Test: TreeHugger
Bug: 154281342
Change-Id: I5bbb2d2b733bbd6b868898285683ba5ff45be10b
This reverts commit 17d69e3484.
Reason for revert: This new field is not useful without dependencies in aosp
Test: builds
Change-Id: I87bd820cd6dbc5274ce3d28c4578381718aa805d
Merged-In: I70d6f7dc751510311b03e245b2189a76b395a49c
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.
Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.
Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
The stubs source should be generated using the same classpath that is
used to compile the implementation library, i.e. sdk_version,
system_modules and libs/static_libs.
Previously, the sdk_version used to generate the stubs was different.
It provided access to a wider API surface than was necessary. This
change fixes that.
Test: m checkapi
Bug: 155164730
Change-Id: I7bc54dc4ad12a7d6c7503111d1322ee35c56d713
runtime_resource_overlay is put to an APEX via 'apps' property. It is
placed under ./overlay directory in it.
Bug: 154822536
Test: m
Change-Id: I8edf4a26c26368c52fb7b327b2ecc829f21ea148
All updatable modules are expected to declare their earliest platform
version they support.
Bug: 153539598
Test: m
Change-Id: I6243d276e5ab25a1007187ad34789ca1b4cc87bf
Previously there was a discrepancy between the generated paths for
Soong modules that used "out/soong/system_server_jars" and Make modules
that used "out/system_server_jars". This happened because the default
output directory is $OUT/soong for the normal Soong config and jsut $OUT
for the reduced "null config" created by dexpreopt_gen.
As a result, class loader context for system server jars defined in Make
was referring to nonexistent jars, which caused non-fatal dex2oat errors
(the build was not broken, so the errors remained unnoticed):
Failed to determine oat file name for dex location out/system_server_dexjars/[...]
Could not open dex files from location: out/system_server_dexjars/[...]
Test: aosp_walleye-userdebug boots
Test: cherry-picked in master-arc-dev that has a Make system server jar
arc-services, `lunch lunch cheets_x86-userdebug && m`, check that the
generated dexpreopt.sh for arc-services contains paths starting with
"out/soong/system_server_jars" rather than "out/system_server_jars".
Bug: 140712566
Change-Id: Ia7ea8ac383e32042c31d64971cdc8101ea3068cd
For a given variant of a module that implements ApexModule interface,
the "updatable" property tests if this variant comes from an updatable
apex. For platform variants it is always false.
Test: lunch aosp_walleye-userdebug && m nothing
Bug: 138994281
Change-Id: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
Like other prebuilts (java_import, etc.), android_app_import has now
became ApexModule. It means it supports APEX-specific properties like
apex_available, min_sdk_version, etc.
Bug: 154488897
Test: m
Change-Id: I86f02771496ffc68c98a50ddfc786788fa1e05fb
kapt claims to support a comma separated list of annotation
processors, but it errors if multiple annotation processors
are given. Surrounding the the list with {} does not error,
but it also doesn't even warn if the second element in the
list is garbage, so it may not be running the second
processor. Repeat the processor argument for each
annotation processor class instead.
Bug: 154736649
Test: TestKapt
Test: m checkbuild
Change-Id: I4c7c161dbf867d7fba1aaf16fd5e502647e3f682
Nothing passes these arguments, so it's dead code.
There is a lot of other cruft in this file that is effectively
dead code, but required further cleanup.
Bug: 152479829
Test: m
Change-Id: Ib2630d4d49f21003b17e2331b0900e8df0a27e66
Merged-In: Ib2630d4d49f21003b17e2331b0900e8df0a27e66
(cherry picked from commit 0ee713aa0e)