Commit Graph

19747 Commits

Author SHA1 Message Date
Treehugger Robot
e04534cd62 Merge "java_sdk_library: Define relationship between api scopes" am: aa71638941
Change-Id: Ia704d3ba4157806f8b901f4b54279f4c5525f675
2020-05-07 09:45:36 +00:00
Treehugger Robot
aa71638941 Merge "java_sdk_library: Define relationship between api scopes" 2020-05-07 09:37:54 +00:00
Paul Duffin
4bfed659d9 Merge changes I13df3115,I825c6df0 am: 955ade6475
Change-Id: Iba825844a68e1bd42bfc1b6cffb072600573d60c
2020-05-07 09:37:30 +00:00
Paul Duffin
955ade6475 Merge changes I13df3115,I825c6df0
* changes:
  Add hook to be called after defaults have been applied
  Move prebuilts mutators after defaults have been applied
2020-05-07 09:18:26 +00:00
Yo Chiang
f8ae216e9c Merge "APEX should require base module of stub libraries" am: 6345dfde49
Change-Id: Ia137c47464b8bb4ea13ee517c554d75081488f6e
2020-05-07 06:35:22 +00:00
Yo Chiang
6345dfde49 Merge "APEX should require base module of stub libraries" 2020-05-07 06:13:49 +00:00
Paul Duffin
bb59252cb2 Merge "Encapsulate getter into an extractorProperty structure" am: 97486dbb4b
Change-Id: I32720b04f935a260dd8a11698569c0aede95d8d1
2020-05-06 20:28:52 +00:00
Paul Duffin
77a36cdc8a Merge "Encapsulate properties to be optimized in a container" am: 11c91dc141
Change-Id: If8a586aa4bced69542ff99cfc5a8dd437645351c
2020-05-06 20:28:44 +00:00
Paul Duffin
97486dbb4b Merge "Encapsulate getter into an extractorProperty structure" 2020-05-06 20:18:39 +00:00
Paul Duffin
11c91dc141 Merge "Encapsulate properties to be optimized in a container" 2020-05-06 20:18:22 +00:00
Makoto Onuki
308b257151 Merge "Merge the "big 3" metalava invocations into one" am: 574cc84a33
Change-Id: I11ae24ed9c5c17c5842ccf71e571ee722ab7d8aa
2020-05-06 19:39:34 +00:00
Makoto Onuki
574cc84a33 Merge "Merge the "big 3" metalava invocations into one" 2020-05-06 19:18:12 +00:00
Paul Duffin
b28369a982 Encapsulate getter into an extractorProperty structure
Refactors the existing code to wrap a getter with a structure in order
to simplify adding additional per-property information. Adds an
emptyValue field to contain the empty value appropriate for the field
type.

Bug: 155628860
Test: m nothing
Change-Id: I7e169bd9b6e51b88e35bdf8673a5056337f778c1
2020-05-06 18:40:41 +01:00
Paul Duffin
f34f6d8538 Encapsulate properties to be optimized in a container
This allows additional metadata to be associated with a set of
properties that will be used in a follow up change to filter
properties that are ignored in some variants (e.g. host variants).

Bug: 155628860
Test: m nothing
Change-Id: Ie83c1ffbb71fd5d7a08d350571dad3e3209b1431
2020-05-06 18:40:41 +01:00
Paul Duffin
97b53b83e4 java_sdk_library: Define relationship between api scopes
Needed for follow up changes.

Test: m checkapi
Bug: 155164730
Change-Id: I163223caed38161ce1fa7b96dc3772194c32c3e2
2020-05-06 18:40:35 +01:00
Kris Alder
e2967d8f4e add researcher_submitted field to cc_fuzz am: e051d0d324
Change-Id: Id14ad01406da3750d99dfb33856081287a30593f
2020-05-06 16:48:43 +00:00
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
Yo Chiang
29555d5f33 APEX should require base module of stub libraries
Bug: 155841765
Bug: 7456955
Test: m nothing and check the content of out/soong/Android-*.mk
Change-Id: I1f109c27a5e9bcfeb3a887b2e8d6a2cf983aa730
2020-05-06 09:18:01 +00:00
Paul Duffin
afa9fa104d Add hook to be called after defaults have been applied
Previously, the only way for a module type to create modules (other
than defining its own mutator) was to register a LoadHook. However,
that is called before defaults are applied so any properties used in
that hook cannot take advantage of defaults, e.g. java_sdk_library
cannot use defaults to set its sdk_version property and have that
affect its child modules.

This change adds a new SetDefaultableHook() to DefaultableModule to
register a hook that is called after any defaults have been applied.

Also adds some tests to ensure that errors in the visibility property
introduced in a DefaultableHook are reported in the gather phase of
visibility processing.

A follow up change will switch java_sdk_library to use that instead
of the AddLoadHook() mechanism.

Bug: 155295806
Test: m checkapi
Change-Id: I13df3115f9e225f7324b6725eaeb16a78cc2538a
2020-05-06 08:55:19 +01:00
Paul Duffin
c988c8e202 Move prebuilts mutators after defaults have been applied
A follow up change will add a mechanism for a module to register a hook
that is called after any defaults have been applied. That is intended
for use by modules like java_sdk_library that create child modules that
are dependent upon properties that could be supplied by defaults.

Creating those child modules after prebuilts mutators are run will
cause problems if those child modules clash with prebuilts modules.
Moving the prebuilts mutators after the defaults mutators will fix
that.

Tests are currently being run with the mutators in different orders so
this change also cleans that up so they are consistent with the actual
code that is being run.

Bug: 155295806
Test: m checkbuild
Change-Id: I825c6df09058fb3a45db196661959eb332aca2f3
2020-05-06 08:55:16 +01:00
Kris Alder
e051d0d324 add researcher_submitted field to cc_fuzz
Bug: 155105113
Test: make haiku
Change-Id: If6a3f2c7af9ebb41327e3695c850f962adb4122c
2020-05-06 03:25:54 +00:00
Treehugger Robot
c11d79fe52 Merge "Simplify package by using LoadHook instead of mutators" am: 00789cc58b
Change-Id: I897cbf1ab00fbb37b9545ffb9395e55b8e137482
2020-05-06 02:43:36 +00:00
Treehugger Robot
00789cc58b Merge "Simplify package by using LoadHook instead of mutators" 2020-05-06 02:28:38 +00:00
Ramy Medhat
aacf301e75 Merge "Add support for the remote execution of metalava actions." am: a1ffd53fe4
Change-Id: I6ced680c921be0291b9f8ba76814ff2d6001944a
2020-05-05 22:06:30 +00:00
Ramy Medhat
a1ffd53fe4 Merge "Add support for the remote execution of metalava actions." 2020-05-05 21:53:26 +00:00
Chris Gross
d82aae1f16 Merge "Allow bootjars in system_ext." am: 7097b0580c
Change-Id: I30c69ed439912603223285d75cfeb6e84690b133
2020-05-05 21:15:42 +00:00
Chris Gross
7097b0580c Merge "Allow bootjars in system_ext." 2020-05-05 21:12:39 +00:00
Paul Duffin
cdfcec98bb Simplify package by using LoadHook instead of mutators
This was not previously possible due to LoadHooks being run after the
module was registered.

Bug: 155462403
Test: m nothing
Change-Id: Ia8383b9d1272bb12c8a83948753a0e4b0d98a650
2020-05-05 20:47:04 +01:00
Treehugger Robot
e075b52ecc Merge "Improve error messages when output file is invalid" am: 39298b3598
Change-Id: Ie43c3694dc0397727609220fc48183321401621b
2020-05-05 17:27:11 +00:00
Treehugger Robot
39298b3598 Merge "Improve error messages when output file is invalid" 2020-05-05 17:11:39 +00:00
Matthew Maurer
5b40899324 Merge "Switch rustc to 1.43.0" am: e7fe2527f6
Change-Id: Ia5cbc505a8602d55a699aa6d9f60e0598e35b9b6
2020-05-05 16:57:16 +00:00
Matthew Maurer
e7fe2527f6 Merge "Switch rustc to 1.43.0" 2020-05-05 16:43:47 +00:00
Alexander Smundak
312653b417 Merge "Canonicalize saved paths, Kythe cannot handle symlinks" am: bd1f870df3
Change-Id: Ic274bf1c2369c96f3a3fb98c5c40d49d8a76adb4
2020-05-05 16:06:48 +00:00
Alexander Smundak
bd1f870df3 Merge "Canonicalize saved paths, Kythe cannot handle symlinks" 2020-05-05 15:54:46 +00:00
Anton Hansson
7425fd91f0 Merge "Disable "check last" for test api" am: a1910e8488
Change-Id: I2028cec3f3bbd61bbc98c8256e3ab0ef8bf2c536
2020-05-05 15:44:37 +00:00
Anton Hansson
a1910e8488 Merge "Disable "check last" for test api" 2020-05-05 15:42:53 +00:00
Paul Duffin
300c238638 Merge "Document preArch mutators" am: d0666441b5
Change-Id: I6fc9b7879edde9b6ba62f979bd13ad01fa4220cd
2020-05-05 15:37:10 +00:00
Paul Duffin
d0666441b5 Merge "Document preArch mutators" 2020-05-05 15:24:16 +00:00
Anton Hansson
6478ac17fc Disable "check last" for test api
@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)
2020-05-05 14:52:49 +01:00
Anton Hansson
0b0dbf3973 Merge "Make prebuilt_sdk support module-lib and system-server" am: fb6d57e134
Change-Id: Icb10efc4addf7f64b7d80123f32ec3ffc6931fae
2020-05-05 13:25:40 +00:00
Paul Duffin
712993cf0c Improve error messages when output file is invalid
Bug: 155720025
Test: m nothing
Change-Id: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
2020-05-05 14:12:22 +01:00
Anton Hansson
fb6d57e134 Merge "Make prebuilt_sdk support module-lib and system-server" 2020-05-05 13:12:10 +00:00
satayev
a07f9df5d7 Merge changes Ie6568cb8,Ibd521c96 am: 292e7c0721
Change-Id: Id5f6fc01db73bc8a64db98a8bef5c8edc7813568
2020-05-05 13:00:26 +00:00
satayev
292e7c0721 Merge changes Ie6568cb8,Ibd521c96
* changes:
  Introduce min_sdk_version to deps info.
  Introduce flat deps info list.
2020-05-05 12:47:48 +00:00
Paul Duffin
aa4162e71e Document preArch mutators
Bug: 155295806
Test: m checkbuild
Change-Id: I4cd6647a8707f49363d297a3b3082ef19ba93868
2020-05-05 11:35:43 +01:00
satayev
ed11483aa6 Merge "Export depsInfo into android package." am: 57769e469b
Change-Id: I70884847b9767c6a06b68d548ff204e1cdeb4458
2020-05-05 10:17:27 +00:00
satayev
57769e469b Merge "Export depsInfo into android package." 2020-05-05 10:00:41 +00:00
Treehugger Robot
f7d0e1452b Merge "Fix build error of sysprop_library in namespace" am: 0a80524957
Change-Id: I573962b79e9e7d8e19a7a723283b93ea1efdc7f1
2020-05-05 06:07:55 +00:00
Treehugger Robot
0a80524957 Merge "Fix build error of sysprop_library in namespace" 2020-05-05 05:50:02 +00:00
Jaewoong Jung
068e22ebb9 Merge "Make android_app_import multi targets arch module." am: baf8c3a804
Change-Id: I55e944d317d65bc0326b2751865fc6f1554abb85
2020-05-05 01:33:06 +00:00