Commit Graph

4800 Commits

Author SHA1 Message Date
Treehugger Robot
fcf8e11732 Merge "Expose "full" dexpreopt.config" am: a3693772a6 am: 375e5d7a47
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666384

Change-Id: I16478381c334c2a47b4bb193aed9c180b609c152
2021-04-23 07:46:03 +00:00
Treehugger Robot
a3693772a6 Merge "Expose "full" dexpreopt.config" 2021-04-23 06:47:57 +00:00
Jaewoong Jung
3c87b1df11 Fix minor issues in updatability lint CLs.
Test: TreeHugger
Bug: 182349282
Change-Id: Ifae282d51b088d0562605b41a09696d75c5138f1
2021-04-22 13:40:41 -07:00
Paul Duffin
d0283d0a5a Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" am: 0f28a51669 am: b9ede6228f am: c5e960d1ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682091

Change-Id: Ic8ed89598074bc89aaef2d6081e2884b73ee6ef5
2021-04-22 17:22:42 +00:00
Paul Duffin
3b34058072 Merge "bootclasspath_fragment: Add contents to snapshot" am: 6e0a62b773 am: 889010d73a am: 855362a5da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682090

Change-Id: Ie107e8986b9b0dc4251f8e28427399854b44ec43
2021-04-22 17:22:35 +00:00
Paul Duffin
d36bd335f9 Merge "Workaround build failure in coverage build" am: c69bfdd53b am: eb3fecce39 am: ab2941a932
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683873

Change-Id: If44e9885f4c1e3d7743bd7a9187f8dca30fdfcad
2021-04-22 17:22:28 +00:00
Paul Duffin
c5e960d1ae Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" am: 0f28a51669 am: b9ede6228f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682091

Change-Id: I4feae7a8f003604eeda442fec6b118a8596baaae
2021-04-22 17:20:27 +00:00
Paul Duffin
855362a5da Merge "bootclasspath_fragment: Add contents to snapshot" am: 6e0a62b773 am: 889010d73a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682090

Change-Id: I1a34c19f2fd2ceda3d7353f933a31957d1844d54
2021-04-22 17:10:41 +00:00
Paul Duffin
ab2941a932 Merge "Workaround build failure in coverage build" am: c69bfdd53b am: eb3fecce39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683873

Change-Id: I9d3985c9bd13058a8ec1c2469b0cdc695f7e9a8d
2021-04-22 17:10:34 +00:00
Paul Duffin
0f28a51669 Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" 2021-04-22 17:02:58 +00:00
Paul Duffin
6e0a62b773 Merge "bootclasspath_fragment: Add contents to snapshot" 2021-04-22 17:01:24 +00:00
Paul Duffin
c69bfdd53b Merge "Workaround build failure in coverage build" 2021-04-22 16:54:12 +00:00
Paul Duffin
a9dd6faae5 Workaround build failure in coverage build
The jacocoagent is special as while it is depended on by prebuilts it
is not actually a prebuilt.

Bug: 177892522
Bug: 186118711
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing
      Previous command fails without this change and works with it.
Change-Id: I8fba922fc40919936d74a6f95af745e37f1ca61f
2021-04-22 17:31:50 +01:00
Jaewoong Jung
abf3d40d84 Merge changes Ia74a2b83,I30a46c8f,Iac7c0149 am: d6599f5573 am: a9aa24ea33 am: c7f1d66e2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683373

Change-Id: I6cb94032c7ddb0b62dad2dbb4a3b2ac5fe31ec68
2021-04-22 16:18:18 +00:00
Paul Duffin
5bca2f26f2 Merge "Move monolithic stub flags generation to platform_bootclasspath" am: 57d13c6892 am: 5774eb9e14 am: ea69b4109b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683866

Change-Id: Id0e5e6dc8596b7d47fe65c47a66da7a86c20c6cb
2021-04-22 16:17:56 +00:00
Paul Duffin
1dfa82423f Merge "Extract common stub flags code" am: d631512659 am: d8d72e85f6 am: 9b76c7bee2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683865

Change-Id: I1225ec1b03ec04745e982918d8540298a7f6b9de
2021-04-22 16:17:20 +00:00
Jaewoong Jung
c7f1d66e2c Merge changes Ia74a2b83,I30a46c8f,Iac7c0149 am: d6599f5573 am: a9aa24ea33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683373

Change-Id: I39be09feff6fa678f31c8a131a1e66e8aa219046
2021-04-22 15:53:47 +00:00
Paul Duffin
ea69b4109b Merge "Move monolithic stub flags generation to platform_bootclasspath" am: 57d13c6892 am: 5774eb9e14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683866

Change-Id: Ia4b4ad562a0e90351334cae9a323466f6c7a569b
2021-04-22 15:53:26 +00:00
Paul Duffin
9b76c7bee2 Merge "Extract common stub flags code" am: d631512659 am: d8d72e85f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683865

Change-Id: I2aa0acb55e98e1399516f582525419d93fbadc14
2021-04-22 15:53:13 +00:00
Jaewoong Jung
d6599f5573 Merge changes Ia74a2b83,I30a46c8f,Iac7c0149
* changes:
  Add lint.strict_updatability_linting
  Move Java lint tests to lint_test.go
  Forbid bypassing updatability lint checks.
2021-04-22 15:39:41 +00:00
Paul Duffin
57d13c6892 Merge "Move monolithic stub flags generation to platform_bootclasspath" 2021-04-22 15:06:16 +00:00
Paul Duffin
d631512659 Merge "Extract common stub flags code" 2021-04-22 15:05:54 +00:00
Paul Duffin
677de9427b Merge changes I67589bcc,Ibcfae390 am: 7cbdf81e95 am: 33f495f305 am: 13b9d25ed4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683868

Change-Id: Idb4d7af1bf9914bf7bf0306d04daf74ee992fc5e
2021-04-22 15:05:03 +00:00
Paul Duffin
13b9d25ed4 Merge changes I67589bcc,Ibcfae390 am: 7cbdf81e95 am: 33f495f305
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683868

Change-Id: I1b3d7fae197d3e072ac205cfe8e09a1c6bf0ddc3
2021-04-22 14:41:43 +00:00
Paul Duffin
7cbdf81e95 Merge changes I67589bcc,Ibcfae390
* changes:
  Replace boot image with bootclasspath fragment in sdk package
  bootclasspath_fragment must only depend on source contents
2021-04-22 14:02:43 +00:00
Anton Hansson
67e20e2ff8 Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4 am: ec47b30e0e am: 05ecab28a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: Ie716a56bd455bead4ee1bad88203cb7d24d10512
2021-04-22 13:39:57 +00:00
Paul Duffin
74431d57c6 Move monolithic stub flags generation to platform_bootclasspath
As part of that this change:
* Moves code that will be common to platform_bootclasspath and
  bootclasspath_fragment from hiddenapi_singleton.go into
  hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
  does not rename them or move them into a more appropriate place so
  as to make it easier to see the differences. A TODO has been added
  and these will be cleaned up in a follow up change.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
2021-04-22 14:23:28 +01:00
Paul Duffin
3e7fcc3fe7 Extract common stub flags code
The stubFlagsRule does three separate tasks:
1. It computes the set of modules that provide the stubs.
2. It scans all the modules to find the stub modules and retrieves the
   paths to their dex files.
3. It constructs the ninja rule.

Of those three tasks, 1 and 3 will be same for the
platform_bootclasspath. Instead of searching all the modules for the
ones that provide the stubs it will simply add dependencies onto the
stub modules and retrieve the dex file paths from them.

This change extracts tasks 1 and 3 into separate methods for reuse. It
also parameterizes the generation of the ninja rule.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I893845dbddc4b001dfd44d0e0b1c8a31b7f3f89f
2021-04-22 14:23:08 +01:00
Anton Hansson
05ecab28a3 Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4 am: ec47b30e0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: Iafe4f8df922fc2234de596b1f1c3819accc50656
2021-04-22 13:11:33 +00:00
Anton Hansson
24eac476d4 Merge "Add new stub_only_static_libs attr for sdk_library" 2021-04-22 12:41:46 +00:00
Artur Satayev
a34bee0ec5 Don't plumb PRODUCT_*_CLASSPATH vars to make.
They were used to generate export values for BOOTCLASSPATH and friends;
which are now generated by derive_classpath service based on proto
configs at runtime.

Bug: 180105615
Test: m && launch_cvd; presubmit / DeviceBootTest
Change-Id: Ifbf3f076a00e084d47a48180a4286fc53e610c5d
2021-04-22 13:35:52 +01:00
Anton Hansson
dae54cd84f Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.

Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.

Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
2021-04-22 10:20:13 +01:00
Rupert Shuttleworth
51fbe9023c Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b am: 950c2381dd am: bd7a5537b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I689bd1e06c0ddf6166d8ff01496898095df72c97
2021-04-22 04:17:02 +00:00
Rupert Shuttleworth
bd7a5537b8 Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b am: 950c2381dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I9e1739c19cab87cdc17bed5a88e21e52f9d0f6df
2021-04-22 03:55:31 +00:00
Treehugger Robot
684051abed Merge "Add tempPathForRestat to improve consistency" am: f434cb5c1d am: 6c1532d37e am: 5aab26cdda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683867

Change-Id: Ib5b3dc68a1af2d479bd1b09546174c7c0f8c25e6
2021-04-22 03:37:46 +00:00
Treehugger Robot
5aab26cdda Merge "Add tempPathForRestat to improve consistency" am: f434cb5c1d am: 6c1532d37e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683867

Change-Id: I014911a6d439cdb52ddcc5372eaa6e03506e8ebb
2021-04-22 03:12:43 +00:00
Rupert Shuttleworth
dac451715b Merge "Add various test files as testSrcs, so that they run on CI." 2021-04-22 03:08:21 +00:00
Jaewoong Jung
48de883834 Add lint.strict_updatability_linting
The flag prevents developers from skipping updatability lint checks with
baseline files

Test: lint_test.go & manual
Bug: 182349282
Change-Id: Ia74a2b83c7ef686124128bdf16f7b85a919d9e8d
2021-04-21 16:56:49 -07:00
Jaewoong Jung
11623b6052 Move Java lint tests to lint_test.go
Test: lint_test.go
Bug: 182349282
Change-Id: I30a46c8f704e66cd04541c78d3f22a140d3284ef
2021-04-21 16:56:43 -07:00
Jaewoong Jung
79e6f6bfcc Forbid bypassing updatability lint checks.
Test: lint_test.go
Bug: 182349282
Change-Id: Iac7c01493b449c2ddd6df6c68f8a74dfe72dfd7a
2021-04-21 16:56:19 -07:00
Paul Duffin
7c95555d79 bootclasspath_fragment: Add hidden API flag files to snapshot
These are needed at the moment to ensure the hidden API processing
generates the same set of flags whether it is being generated from
source or prebuilts. Soon these will be needed to ensure that the
hidden API flags generated for the individual modules are compatible
with previous releases.

Bug: 179354495
Test: m art-module-sdk and check snapshot zip contains the files
      and the generated Android.bp references them.
Change-Id: I9a3334cc48faa381bbbcbbb59479db719042796a
2021-04-21 23:54:22 +01:00
Paul Duffin
a57835e8e5 bootclasspath_fragment: Add contents to snapshot
Bug: 177892522
Test: m nothing
Change-Id: I54fe0537b758a0e3dacd34b139ef3eb21b8841fd
2021-04-21 23:54:22 +01:00
Paul Duffin
d3c1513df9 Add tempPathForRestat to improve consistency
Previously, there were two approaches used to construct the temporary
path needed by the commitChangeForRestat method and neither was
suitable for general use. One was:
    android.PathForOutput(ctx, outputPath.Rel()+".tmp")
The other was:
    combinedAidl.ReplaceExtension(ctx, "aidl.tmp")

The first approach would not work if the supplied path had been created
by PathForModuleOut() or similar as it would drop the module directory.
That could lead to the same path being used for multiple rules.

The second approach would not work for files with a different
extension.

The tempPathForRestat combines the two approaches so it can be used
generally with any WritablePath.

Bug: 179354495
Test: verified that the ninja rules that used these files were not
      changed by these changes.
Change-Id: I4439dea0a823512c281eeb1366522fb49dceb4e3
2021-04-21 23:26:57 +01:00
Paul Duffin
9edf2f1ee9 Merge "Skip initHiddenAPI check of prebuilt's boot dex jar for APEX modules" am: eaa432d470 am: fb57372edb am: 3fb47c846b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682094

Change-Id: I842cc48154f5508a0e27cd6ea535524be33ee6fb
2021-04-21 18:25:53 +00:00
Paul Duffin
6589805e2a bootclasspath_fragment must only depend on source contents
This change ensures that bootclasspath_fragment only depends on source
modules and prebuilt_bootclasspath_fragment only depends on prebuilt
modules.

It does that in two ways:
1. It adds the dependencies in ComponentDepsMutator method which is
   called before any renaming of prebuilts is done which makes it very
   easy to add a dependency directly onto either the source or prebuilt
   as required.
2. It uses a tag which prevents dependencies on a source module from
   being replaced with a dependency on a prebuilt module which ensures
   that a dependency on the source modules is not replaced with a
   dependency on a prebuilt module.

Bug: 177892522
Test: m nothing
Change-Id: Ibcfae39083afbc07fcf729ead3ed5f5d020845bf
2021-04-21 19:05:37 +01:00
Paul Duffin
3fb47c846b Merge "Skip initHiddenAPI check of prebuilt's boot dex jar for APEX modules" am: eaa432d470 am: fb57372edb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682094

Change-Id: Ic125330d65870ec4572c0bdbe238c9e65a612fc8
2021-04-21 18:02:52 +00:00
Paul Duffin
eaa432d470 Merge "Skip initHiddenAPI check of prebuilt's boot dex jar for APEX modules" 2021-04-21 17:14:56 +00:00
Rupert Shuttleworth
b7e30760af Add various test files as testSrcs, so that they run on CI.
Test: go test
Test: TH (now that these are hooked up to TH)

Change-Id: Ia199794ef1a64074f3f9159f8c160ba3e45fd181
2021-04-21 11:23:57 -04:00
Paul Duffin
e2eaacd31b Merge "Rename propertyAccessor to propertyValueReader" am: 9a26f8cf2a am: cfc5529a40 am: 1cec92551a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682432

Change-Id: I19bf5bcbd9d4020596c8c5c65e530503c5abc63e
2021-04-21 15:08:30 +00:00
Paul Duffin
1cec92551a Merge "Rename propertyAccessor to propertyValueReader" am: 9a26f8cf2a am: cfc5529a40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682432

Change-Id: If9edb3858b43411a2f81eb566bc0504c840f927b
2021-04-21 14:45:14 +00:00