Commit Graph

3511 Commits

Author SHA1 Message Date
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
Saeid Farivar Asanjan
f043696fb9 Add jetifier support to android_library_import
Bug: 170242653
Test: manual
Change-Id: I9b49ea9ed18041c5509d4d53a3ce8fdf58c8c537
2020-10-12 17:51:38 +00:00
Jaewoong Jung
c779cd403f Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies.
With this change, users don't need to figure out which libraries
actually hold the resources to be overlaid when targetting apps with a
core lib dependency (e.g. Settings, SystemUI).

Fixes: 169898727
Test: app_test.go
Change-Id: I3c3b9dc0a377b1828db1199858a73d080a173205
2020-10-12 10:34:36 -07:00
Jaewoong Jung
19bc60abee Merge "Add config.AndroidFirstDeviceTarget." 2020-10-12 17:30:18 +00:00
Anton Hansson
b91d8b11e8 Merge "Make hiddenapi flag generation use new artifact" am: 53781d55bc am: 1658d4f74f am: 635e1f7193 am: 14d3bb9632
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450117

Change-Id: I7842789d7cfc530528d7dc7bffa0f6973ffb207d
2020-10-12 17:27:55 +00:00
Anton Hansson
53781d55bc Merge "Make hiddenapi flag generation use new artifact" 2020-10-12 16:08:11 +00:00
Jaewoong Jung
642916f20a Add config.AndroidFirstDeviceTarget.
Targets[Android][0] is not always the first, preferred target. Add a new
field to config to provide the correct target and begin to use it.

Test: m nothing
Test: build/soong/scripts/build-ndk-prebuilts.sh
Fixes: 156980228
Change-Id: Ib56f52424ebf47f3eee6ac62b9fd9eca2919d63a
2020-10-12 14:15:19 +00:00
Anton Hansson
858a8cabf9 Merge "Add a Impl_only_libs prop for sdk_library" 2020-10-12 09:00:13 +00:00
Colin Cross
f376e13ce5 Revert "Make lots of tests run in parallel" am: 405af07859 am: 2ad22c3644 am: af502ff241 am: 04640cbdd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456655

Change-Id: Iee706968d37c90bcb020c508f6650eeb7cba9da0
2020-10-10 08:12:20 +00:00
Colin Cross
89226d9ef9 Add jni_libs to host java binaries
Add a property to support dependencies on JNI libraries for host
java binaries.

Fixes: 170389375
Test: TestBinary
Change-Id: Ieeca3c3997615f0b17ae1f058b94e6c9ba929cab
2020-10-09 19:27:34 -07:00
Colin Cross
c179ea6812 Make java_binary common variant a dependency
ctx.PrimaryModule() is wrong in the case of a java_binary that
supports both host and device, use an explicit dependency instead.
Once the dependency exists there is no need to manually request
the jar be installed, it will automatically be installed by the
host installation rules for dependencies.

Test: TestBinary
Change-Id: Iddeea2d08bc574c79d42139020558cd70d718ca1
2020-10-09 19:27:34 -07:00
Colin Cross
de78d138a1 Replace jniDependencyTag with a value
Support GetDirectDepsWithTag on JNI deps by replacing the
jniDependencyTag type with a jniLibTag value.

Test: app_test.go
Change-Id: I8d66a5d3f433562e131a1fbafce75891d1b094dd
2020-10-09 19:24:05 -07:00
Colin Cross
405af07859 Revert "Make lots of tests run in parallel"
This reverts commit 323dc60712.

Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests

Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-09 18:34:24 -07:00
Anton Hansson
6bcf86c676 Merge "Add a Impl_only_libs prop for sdk_library" 2020-10-09 12:49:43 +00:00