platform_build_soong/java
Makoto Onuki 88b9905d74 Merge the "big 3" metalava invocations into one
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
2020-05-06 13:00:01 +01:00
..
config Refactor RBE support for Javac/R8/D8 to use the remoteexec package. 2020-04-28 11:37:20 -04:00
aapt2.go Add rules to handle asset resources. 2020-01-16 12:19:49 -08:00
aar.go Merge "Allow for setting a logging_parent for an Android App." 2020-02-18 22:57:31 +00:00
android_manifest.go Always use "${codename}.${sha}" if UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true 2020-03-04 22:05:11 +00:00
android_resources.go
androidmk.go Add overrides to runtime_resource_overlay 2020-04-27 16:44:33 -07:00
androidmk_test.go Add a Tag field to dist to dist a tagged output 2020-03-31 09:55:49 +01:00
app.go Make android_app_import multi targets arch module. 2020-05-01 15:50:08 -07:00
app_builder.go Revert "[soong] new field in Android.bp to request APK signing V4" 2020-05-01 11:29:36 -07:00
app_test.go Revert "[soong] new field in Android.bp to request APK signing V4" 2020-05-01 11:29:36 -07:00
builder.go Refactor RBE support for Javac/R8/D8 to use the remoteexec package. 2020-04-28 11:37:20 -04:00
device_host_converter.go jacoco correctly gathers info from APK-in-APEX 2020-01-08 14:49:31 +09:00
device_host_converter_test.go Add method to determine variations from a Target 2019-10-16 14:52:30 -07:00
dex.go Refactor RBE support for Javac/R8/D8 to use the remoteexec package. 2020-04-28 11:37:20 -04:00
dexpreopt.go Fix host path for dexpreopted system server modules defined in Make. 2020-04-27 09:46:02 +01:00
dexpreopt_bootjars.go Use two-column format for PRODUCT_BOOT_JARS components. 2020-04-30 14:42:32 +01:00
dexpreopt_bootjars_test.go Use two-column format for PRODUCT_BOOT_JARS components. 2020-04-30 14:42:32 +01:00
dexpreopt_config.go Merge "Allow bootjars in system_ext." 2020-05-05 21:12:39 +00:00
dexpreopt_test.go Add a rule about platform_apis 2019-07-29 20:48:30 +09:00
droiddoc.go Merge the "big 3" metalava invocations into one 2020-05-06 13:00:01 +01:00
gen.go Shard aidl compiles into srcjars 2019-10-04 14:00:36 -07:00
genrule.go Dedup java genrule module type registration 2019-12-19 19:19:40 +00:00
hiddenapi.go Merge changes Ibaf383c4,I2b1c0736 2020-02-25 07:02:33 +00:00
hiddenapi_singleton.go Use modular removed-dex.txt files for greylisting. 2020-03-30 17:25:13 +01:00
jacoco.go
jacoco_test.go
java.go Introduce min_sdk_version to deps info. 2020-05-04 19:44:28 +01:00
java_resources.go
java_test.go add aidl.export_include_dirs to java_import module type 2020-03-24 16:44:11 +09:00
jdeps.go Sandbox soong_build by changing to root directory 2020-01-11 01:11:46 +00:00
jdeps_test.go
kotlin.go Repeat kapt processor argument for multiple processors 2020-04-22 20:43:37 -07:00
kotlin_test.go Repeat kapt processor argument for multiple processors 2020-04-22 20:43:37 -07:00
OWNERS
platform_compat_config.go Add support for compat config in APEX. 2020-02-05 13:33:50 +00:00
plugin.go
plugin_test.go
prebuilt_apis.go Make prebuilt_sdk support module-lib and system-server 2020-05-04 13:52:43 +01:00
proto.go Default to compiling lite protos 2019-10-26 20:35:13 +00:00
robolectric.go AndroidMkEntries() returns multiple AndroidMkEntries structs 2019-12-11 17:25:27 +09:00
sdk.go Ensure APEX's Java deps use stable SDKs. 2020-04-27 19:16:40 +01:00
sdk_library.go Disable "check last" for test api 2020-05-05 14:52:49 +01:00
sdk_test.go Make system_server stubs consistent with other stubs 2020-03-25 14:18:02 +00:00
support_libraries.go
sysprop.go Create public stub for platform's sysprop_library 2019-12-19 09:35:23 +09:00
system_modules.go Remove old SdkMemberType API for creating snapshot modules 2020-03-23 08:48:03 +00:00
testing.go Merge "Make system_server stubs consistent with other stubs" 2020-03-25 14:18:32 +00:00
tradefed.go Add tradefed_java_library_host 2019-10-18 15:14:15 -07:00