Commit Graph

3373 Commits

Author SHA1 Message Date
Ulyana Trafimovich
3a81ccd8f9 Merge "Add separate dependency tags for compat libs based on SDK version." am: 05b9a65f25 am: 9d5814ff7c am: 7b898a1960 am: ad16c12eba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1453037

Change-Id: I92ac79581ad5cd29b9e05398d4e9b8ea7345fa2d
2020-10-29 12:04:16 +00:00
Ulyana Trafimovich
9ba949ae48 Merge "Fix handling of "android.test.mock" in class loader context." am: 17da06cfd9 am: 94b74f9559 am: deea2844fd am: a9381bec3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1467832

Change-Id: I6f245711fd003a5f2c3f036241053c781c26c1fd
2020-10-29 12:04:06 +00:00
Ulyana Trafimovich
05b9a65f25 Merge "Add separate dependency tags for compat libs based on SDK version." 2020-10-29 10:27:59 +00:00
Ulyana Trafimovich
17da06cfd9 Merge "Fix handling of "android.test.mock" in class loader context." 2020-10-29 10:27:33 +00:00
Ulyana Trafimovich
175d8d6cd2 Merge "Unify handling of compat and normal libs in class loader contexts." am: c5b6f32751 am: 228f63b4c1 am: 4dc62516cb am: 182b45c981
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450817

Change-Id: Idd32fb1f1cfdff57a152492794fddbb642629190
2020-10-28 18:18:25 +00:00
Ulyana Trafimovich
c5b6f32751 Merge "Unify handling of compat and normal libs in class loader contexts." 2020-10-28 17:05:05 +00:00
Paul Duffin
3527eadd0c Merge "Retry: Make ConfiguredJarList immutable" am: c097474f21 am: 101339a133 am: 104a934353 am: 1e6f10bf33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1476916

Change-Id: I52505ceea5d1284ac3fdfc9f7d3e47a8d85cf972
2020-10-28 11:29:34 +00:00
Paul Duffin
3b8b84973b Cleanup usages of CreateConfiguredJarList am: e10dfa4e3d am: d34168219d am: f80f9004ea am: 6eb013d805
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1471781

Change-Id: I4dcf51fa2fc7b661240943233dbf6312e8163bf3
2020-10-27 18:19:40 +00:00
Paul Duffin
7d584e9360 Retry: Make ConfiguredJarList immutable
By making the Append and RemoveList methods return a new list instead
of modifying the existing list it makes the ConfiguredJarList usages
easier to reason about and safer to use, especially considering that
they are primarily used in global configuration.

Added some tests for Append/RemoveList to ensure that they work and
do not modify the original or result in newly created lists sharing
storage with the original which would lead to corruption.

Bug: 171756871
Bug: 171479578
Test: m nothing
      EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true m nothing
Change-Id: I541c4686ecdd45c6a0c8b1c93fedf0fcd5952e2b
2020-10-27 17:37:20 +00:00
Paul Duffin
7df37bee7f Switch BootJars/UpdatableBootJars to ConfiguredJarList am: 69d1fb1e39 am: 769b1eab84 am: 3e29458b28 am: 0b34b8cdfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1471779

Change-Id: I90e1bafedf0492e8299cad31e7b4a648c3cc3bfa
2020-10-27 17:29:01 +00:00
Ulya Trafimovich
b521811d7b Add separate dependency tags for compat libs based on SDK version.
The version in the tag is the SDK version that in which compatibility
library was added as a separate libary. Using distinct tags makes it
possible to differentiate between dependencies for different SDK
versions (this will be needed in subsequent CLs).

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I72296c05d6649e811ddc701aaeb84f91d1ba66cb
2020-10-27 17:05:30 +00:00
Ulya Trafimovich
46b3d5bd05 Fix handling of "android.test.mock" in class loader context.
Mimick the way PackageManager handles it at runtime: do add it to class
loader context for apps with targetSdkVersion < 30, but only if
"android.test.runner" is used. Previously it was not added at all.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I4c06635277ab13e21069b9fa0b46eb6a2547dfdd
2020-10-27 17:05:30 +00:00
Ulya Trafimovich
24813e1d80 Unify handling of compat and normal libs in class loader contexts.
Also, add tests for compatibility libraries in class loader context.

This CL separates special-case handling of compatibility libraries into
a "fixup" step that is done after class loader context is constructed by
Soong. This allows to handle compatibility libraries and normal
libraries uniformly, which should enable further simplification of class
loader context representation (in subsequent CLs).

Currently the only "fixup" step is removal of libraries from conditional
class loader context if they already are in unconditional context. This
check cannot be done at the time when the libraries are added to
conditional context, because the full uncoditional context is not yet
known at that time. Previously construction of unconditional context was
delayed, now it is no longer delayed and handled in the same way as
unconditional context, and the "fixup" does the filtering.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: Ie71e9fb2d3d529b5317cd84e09ab3c853017c349
2020-10-27 17:05:30 +00:00
Paul Duffin
e10dfa4e3d Cleanup usages of CreateConfiguredJarList
After previous refactorings the CreateConfiguredJarList function is now
only used in tests and are supplied with a PathContext that will cause
ReportPathErrorf() to panic. So, this change removes the ctx parameter,
calls panic directly on any error and renames the method to make it
clear that it is for testing only.

Bug: 171479578
Test: m nothing
Change-Id: Icfb4bdfe720afa855b64ecf0e74a0b030882d029
2020-10-27 10:36:29 +00:00
Paul Duffin
69d1fb1e39 Switch BootJars/UpdatableBootJars to ConfiguredJarList
This change:
* Switches BootJars/UpdatableBootJars fields of config.productVariables
  from []string to ConfiguredJarList.
* Updates BootJars() method to simply concatenate the jars list from
  the BootJars/UpdatableBootJars fields.
* Adds an UnmarshalJSON(..) method to ConfiguredJarList to support
  unmarshalling from a single string array to avoid having to change the
  format of the JSON file from which the configuration is loaded.
* Adds some additional calls to ConfiguredJarList(..) in tests to
  convert from []string to ConfiguredJarList. They pass nil as the
  ctx argument as there is no suitable PathContext which will cause any
  errors to be thrown using panic. That is reasonable for hard coded
  values in tests. A follow up change will clean up the calls to
  ConfiguredJarList(..).

Bug: 171479578
Test: m nothing
Change-Id: I59b94dafb479ccd8f0471ed802be175af57be271
2020-10-27 10:36:29 +00:00
Anton Hansson
71beaf12dc Merge "Make highmem classification of metalava optional" am: 72b1df4b79 am: ba63a2c9ce am: d951c976bb am: e04d8e7b3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1474017

Change-Id: I8473530af498e04b0880f921920448b36597a1a8
2020-10-27 09:39:42 +00:00
Joanne Chung
342c8bba27 Merge "Revert "Make ConfiguredJarList immutable"" am: 578b5f06c6 am: 1f67171167 am: 7b907ab4eb am: 495a40d67d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1475896

Change-Id: Ib65f69eadfc708fc2775768c29abb79bcf6b4553
2020-10-27 06:15:12 +00:00
Joanne Chung
1f25794e03 Revert "Make ConfiguredJarList immutable"
This reverts commit 052f4727fe.

Reason for revert: Looks to have broken master b/171756871

Change-Id: I6b3b7039c3e3b8ac453734281cb8e7c71b65aed3
2020-10-27 03:22:29 +00:00
Paul Duffin
f63c3b4925 Merge "Make ConfiguredJarList immutable" am: e1878c101d am: 7ad2fa969b am: 89e8d18655 am: 8df961a826
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1471776

Change-Id: Ia35aa8e42f0a88f6182ac6aa0e91ce1b204c23cf
2020-10-26 21:28:28 +00:00
Paul Duffin
052f4727fe Make ConfiguredJarList immutable
By making the Append and RemoveList methods return a new list instead
of modifying the existing list it makes the ConfiguredJarList usages
easier to reason about and safer to use, especially considering that
they are primarily used in global configuration.

Bug: 171479578
Test: m nothing
Change-Id: I102c4fb42f0c54e4ed299d2921fbf5efeb6e99b9
2020-10-26 15:57:11 +00:00
Anton Hansson
52ac73d21e Make highmem classification of metalava optional
We have added a lot of metalava invocations since the highmem
differentation was added, most of which do not use a lot of memory.

By collecting data of max rss per process we have narrowed down
the set of highmem modules to a smaller set, and will annotate the
relevant modules as such.

Bug: 170701554
Test: NINJA_HIGHMEM_NUM_JOBS=3 m checkapi (no long tail of metalava)
Change-Id: Ic9c8c91388b02889111ef596fc6fd8bde9b42b9d
2020-10-26 11:38:40 +00:00
Mathew Inwood
9b8c1a54b0 Merge "Tag removed APIs as such in hiddenapi_flags.csv." am: 1e8118da95 am: 6123adab59 am: 1f4b17f49e am: f36f496c15
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1469622

Change-Id: I9af52d5b97eefe04dc7cf81127c219d1ecf0799a
2020-10-26 11:02:21 +00:00
Mathew Inwood
1e8118da95 Merge "Tag removed APIs as such in hiddenapi_flags.csv." 2020-10-26 08:52:11 +00:00
Cole Faust
64c2fd39c7 Merge "Export proguard_flags_files from android_librarys" am: 26c468c155 am: b32d809f3c am: c03c600591 am: e08ca80890
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1470254

Change-Id: I0ccf20f6acd6469185ac4dfb66c074790125eb81
2020-10-23 21:18:27 +00:00
Cole Faust
26c468c155 Merge "Export proguard_flags_files from android_librarys" 2020-10-23 19:35:57 +00:00
Cole Faust
9a631319ab Export proguard_flags_files from android_librarys
If an android_library has a proguard flag file, that
file should also be used when compiling apps with the
library.

Fixes: 171425221
Test: New unit test in app_test.go, and manually
2020-10-22 21:07:35 +00:00
Mathew Inwood
a44e8c515d Tag removed APIs as such in hiddenapi_flags.csv.
Refactor flags in generate_hiddenapi_lists.py" the invocation to use the
new more flexible schema. Add "--tag removed" to removed.txt APIs so
that we can identify those APIs in the final output.

Test: m -j out/soong/hiddenapi/hiddenapi-flags.csv
Bug: 171300342
Change-Id: I38f2ec7c6e2ff7e5bdd9fe2aeb771d5153a2dc99
2020-10-21 15:52:15 +01:00
Martin Stjernholm
7f51107ee6 Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
2020-10-21 15:41:02 +01:00
TreeHugger Robot
03c718efa1 Merge "Added new target to core_platform list of allowed modules" 2020-10-21 14:01:01 +00:00
Martin Stjernholm
09e2aa9e84 Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
2020-10-20 23:28:49 +01:00
Martin Stjernholm
666981d91c Merge "Move the intermediate directory for ART boot images." am: f657ff1d00 am: 1cbe84940c am: 607ac2fc5a am: e8490a11b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1461622

Change-Id: I1920bddee598229fe0bbfdcf0b4e3dde01f33537
2020-10-20 21:15:04 +00:00
Martin Stjernholm
ea581fc95d Move the intermediate directory for ART boot images.
Free up the directory $(PRODUCT_OUT)/apex/com.android.art for the
release ART APEX. Without this we'll get conflicting install paths in
make.

Test: build/soong/soong_ui.bash --make-mode \
    TARGET_PRODUCT=sdk_x86_64 TARGET_BUILD_VARIANT=userdebug nothing
  with http://r.android.com/q/topic:release-apex-rename+author:mast
  present to rename the ART release APEX to com.android.art.
Test: Build & boot on CF
Test: apct/device_boot_test and asit/perf/boottime_test on
  blueline_jitzygote-userdebug
Test: avd/avd_boot_health_check on cf_x86_phone-userdebug_coverage_art
Bug: 169639321
Change-Id: I0b263d5922d438834e5c804e55f69a2a1421ab73
Merged-In: I0b263d5922d438834e5c804e55f69a2a1421ab73
2020-10-19 20:42:46 +01:00
Ioana Stefan
8fe8f42c0a Added new target to core_platform list of allowed modules
Re-added plugin of intdefs annotation processor. The plugin was
added to a different target (`framework-minus-apex-intdefs`)
because of the refactoring of the `framework-all` target.

Because the new target depends on `core_platform`, it needs to
also be added to this list.

Test: run 'mp :framework-minus-apex-intdefs' and check that it builds
Change-Id: I96d4941219560049c9a014a40de39978c9e5bbb8
2020-10-16 15:21:07 +02:00
Aaron Huang
01fd0385e1 Merge "Add service-connectivity to legacy core platform list" 2020-10-16 07:03:33 +00:00
Treehugger Robot
94b36c9930 Merge "Add empty tag support for java_import" am: faf30e19d6 am: 479ed0c3cf am: 812f49412a am: f249499d30
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1462684

Change-Id: I48f3bfdd19b723dc4b7c61c5a95f054031ebf23c
2020-10-15 23:13:40 +00:00
Saeid Farivar Asanjan
128fe5c1f5 Add empty tag support for java_import
Test: manual
Change-Id: I53d7c6bb620fa8fe7f5c3ec0a12f723eb62fca16
2020-10-15 17:55:24 +00:00
Anton Hansson
faa866c5f0 Merge "Make test api extend system in sdk_library.go" 2020-10-14 14:43:03 +00:00
Treehugger Robot
e95a865166 Merge "Support building WITHOUT_CHECK_API=true" am: 527b2578ea am: deea9b7659 am: ece1006280 am: f208db8a18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1458439

Change-Id: I881e2525bfb3e650060042368e95b56f84c7b585
2020-10-14 13:50:38 +00:00
Paul Duffin
bc0fe96be3 Support building WITHOUT_CHECK_API=true
When WITHOUT_CHECK_API=true the check api process is not run which
means that the current.txt and removed.txt files are not generated by
the build. In that case this change causes the droidstubs module to
fallback to exporting the source files instead.

An additional removedApiFilePath property (to match apiFilePath) was
added to hold the exported path as removedApiFile has to be a
WritablePath and source paths are not writable.

Bug: 169034951
Test: m WITHOUT_CHECK_API=true nothing
      fails without this fix, passes with it.
Change-Id: If6b09dd67c8533368b71405143f524d66350703f
2020-10-13 15:37:10 +01:00
Anton Hansson
ca4b3ae1c1 Merge "Remove jdiff support from droiddoc" am: ff98103505 am: 4b59023120 am: d36247e41b am: d8d6eec2ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455335

Change-Id: Ie2bffa1dca8545b4433c0cbb527ab310ad2c3b28
2020-10-13 09:31:54 +00:00
Anton Hansson
4fe970f303 Make test api extend system in sdk_library.go
The test stubs for the "main" android API are being changed to
incude @SystemApi annotated APIs. Update sdk_library to make modules
and optional libraries follow the same principle.

Bug: 129133308
Test: presubmit
Change-Id: I7bd940e1a8127d954d30c532c74d684a5ba9d33c
Merged-In: I7bd940e1a8127d954d30c532c74d684a5ba9d33c
(cherry picked from commit 13dbaac5b6)
2020-10-13 08:25:00 +01:00
Anton Hansson
36344adc3e Merge "Make test api extend system in sdk_library.go" 2020-10-13 07:22:25 +00:00
Anton Hansson
ff98103505 Merge "Remove jdiff support from droiddoc" 2020-10-13 07:08:13 +00:00
Colin Cross
6e34b72d76 Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3 am: 9ebc22cf2d am: f36b061333 am: ddfc6dcd42 am: 2f48ebc159
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456349

Change-Id: I5d0658c0023bbab9d62857564d167ee2a0950f00
2020-10-13 04:54:14 +00:00
Colin Cross
9ebc22cf2d Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3
* changes:
  Add jni_libs to host java binaries
  Make java_binary common variant a dependency
  Replace jniDependencyTag with a value
2020-10-13 03:33:10 +00:00
Treehugger Robot
131ae5c4a3 Merge "Add jetifier support to android_library_import" am: ff8838cb86 am: 43dea5e3d8 am: f5005f5adb am: 30f9ce220b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451138

Change-Id: I39b617444029a8e70979b2050915b07e7c7059dc
2020-10-13 00:30:17 +00:00
Treehugger Robot
ff8838cb86 Merge "Add jetifier support to android_library_import" 2020-10-12 23:38:06 +00:00
Jaewoong Jung
21df53c381 Merge "Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies." am: c1c415d0f7 am: 1ca5f01a37 am: a9748ead00 am: 50cdac0f07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451145

Change-Id: Ic70fa44bfd6446c33a15312d95872d5cd24d4bf9
2020-10-12 23:01:01 +00:00
Jaewoong Jung
c1c415d0f7 Merge "Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies." 2020-10-12 21:45:33 +00:00
Jaewoong Jung
11b75b64cb Merge "Add config.AndroidFirstDeviceTarget." am: 19bc60abee am: 460960c457 am: 5a6e34b4c1 am: 5f161bd869
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456597

Change-Id: If84c4799b3c4c66a40e7a8aeb8735b67e016ced0
2020-10-12 18:57:17 +00:00