88b9905d74
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 |
||
---|---|---|
.. | ||
config | ||
aapt2.go | ||
aar.go | ||
android_manifest.go | ||
android_resources.go | ||
androidmk.go | ||
androidmk_test.go | ||
app.go | ||
app_builder.go | ||
app_test.go | ||
builder.go | ||
device_host_converter.go | ||
device_host_converter_test.go | ||
dex.go | ||
dexpreopt.go | ||
dexpreopt_bootjars.go | ||
dexpreopt_bootjars_test.go | ||
dexpreopt_config.go | ||
dexpreopt_test.go | ||
droiddoc.go | ||
gen.go | ||
genrule.go | ||
hiddenapi.go | ||
hiddenapi_singleton.go | ||
jacoco.go | ||
jacoco_test.go | ||
java.go | ||
java_resources.go | ||
java_test.go | ||
jdeps.go | ||
jdeps_test.go | ||
kotlin.go | ||
kotlin_test.go | ||
OWNERS | ||
platform_compat_config.go | ||
plugin.go | ||
plugin_test.go | ||
prebuilt_apis.go | ||
proto.go | ||
robolectric.go | ||
sdk.go | ||
sdk_library.go | ||
sdk_test.go | ||
support_libraries.go | ||
sysprop.go | ||
system_modules.go | ||
testing.go | ||
tradefed.go |