Commit graph

47013 commits

Author SHA1 Message Date
sophiez
65a981569f Java used-by API list generation
Wrap the dexdeps output content with "<externals></externals>" to
simplify backend xml parsing.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: I1457eb9558763e50911dc9c689b9bc3fb833a52c
2021-12-10 13:43:10 -08:00
Sorin Basca
2aabb8de52 Merge "Adding experimental option to target Java 11" am: eb59a6d3ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1904231

Change-Id: I0f2cf1d6dbfe020e906260978c9395b669f94032
2021-12-10 14:21:25 +00:00
Sorin Basca
eb59a6d3ea Merge "Adding experimental option to target Java 11" 2021-12-10 13:57:51 +00:00
Inseob Kim
8bc61f24aa Merge "Add BoardPlatVendorPolicy to soong config" am: fcaea66933
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913480

Change-Id: I882ab7fa943f53edf0a7fe0dea603bff25662f18
2021-12-10 12:29:48 +00:00
Inseob Kim
fcaea66933 Merge "Add BoardPlatVendorPolicy to soong config" 2021-12-10 12:13:36 +00:00
Treehugger Robot
25f3ae24eb Merge "Replace Rust global arg with more legible alternative" am: 10fed2697e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1917677

Change-Id: Ia1fb52fdff5f073c34ca7e5aec0ddc6a8e3f57a2
2021-12-10 03:01:23 +00:00
Treehugger Robot
10fed2697e Merge "Replace Rust global arg with more legible alternative" 2021-12-10 02:44:21 +00:00
Remi NGUYEN VAN
b68677917b Merge "Relax apex package restriction for T+ jars" am: 4d5cd1f267
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908871

Change-Id: Ie5385ce14e712ab5c74954d1ce9c56f25bbb5df2
2021-12-10 00:17:57 +00:00
Spandan Das
a9938be03e Merge "Set targetSdkVersion to 10000 iff a module is targeting an unreleased sdk" am: 2ee7ac02e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914977

Change-Id: I163ddc446e92e825d3772e83c0e7da8f4ea7c236
2021-12-10 00:17:47 +00:00
Remi NGUYEN VAN
4d5cd1f267 Merge "Relax apex package restriction for T+ jars" 2021-12-10 00:15:17 +00:00
Spandan Das
2ee7ac02e7 Merge "Set targetSdkVersion to 10000 iff a module is targeting an unreleased sdk" 2021-12-09 23:56:37 +00:00
Chris Wailes
bc62193c7f Replace Rust global arg with more legible alternative
Bug: 201431719
Test: m rust
Change-Id: I5e0fae74e1df02f059ddcfa004b29059126a52e0
2021-12-09 13:56:32 -08:00
Liz Kammer
d8db779bef Merge "Add test for performance testing" am: 8f3da38b70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879796

Change-Id: I484a0df80ecfe0131c4a07b13d23082be8822204
2021-12-09 20:50:41 +00:00
Treehugger Robot
1bc4f14604 Merge "The type assertion of DefaultableModule as Module is redundant Test: m nothing Bug: n/a" am: 37dd05bbbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914978

Change-Id: If2dae08811d14d8a549c90a922970b07bf5ab935
2021-12-09 20:49:12 +00:00
Liz Kammer
8f3da38b70 Merge "Add test for performance testing" 2021-12-09 20:46:56 +00:00
Treehugger Robot
37dd05bbbe Merge "The type assertion of DefaultableModule as Module is redundant Test: m nothing Bug: n/a" 2021-12-09 20:02:24 +00:00
Colin Cross
8211f7f7b8 Merge "Set prebuiltCommon.installedFile for apex_set modules" am: 3c48297dde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1915701

Change-Id: I1a13a7b722ead7c80bde100a4ce20d2a47b97c25
2021-12-09 18:38:51 +00:00
Spandan Das
c8cb0c3eb5 Set targetSdkVersion to 10000 iff a module is targeting an unreleased
sdk

Previously in aosp/1907152, targetSdkVersion for all modules would be
10000 in release builds. This would cause sdk compatibility errors like
b/209301265#3 for modules that were targeting a released SDK

This CL adds an additional check to set targetSdkVersion to 10000 only
if a module's apilevel is in preview (i.e. unreleased SDK)

Bug: 209301265

Test: Built various apk combinations locally, and used aapt2 to check
targetSdkVersion
Test: TARGET_BUILD_APPS=xyz m CaptivePortalLoginTests #
targetSdkVersion: 30
Test: m CaptivePortalLoginTests #targetSdkVersion: 30
Test: (internal) TARGET_BUILD_APPS=xyz m MediaProviderGoogle #
targetSdkVersion: 10000
Test: (internal) m MediaProviderGoogle #targetSdkVersion: Tiramisu

Change-Id: Id2901f23d4e1b436f8906940e47edd606a93657d
2021-12-09 18:08:28 +00:00
Colin Cross
3c48297dde Merge "Set prebuiltCommon.installedFile for apex_set modules" 2021-12-09 18:06:36 +00:00
Remi NGUYEN VAN
1fdd6ca88a Relax apex package restriction for T+ jars
The ART AOT exemption only applies to Q/R/S, so module jars that have
min_sdk T+ do not need to follow the module package restriction, even if
they are part of a Q/R/S module (but not loaded on Q/R/S).

Relax the restriction to only apply to jars that have min_sdk before T.

Bug: 208773835
Test: m (runs apex tests)
Change-Id: I2c3ad8984ca05ad763bf6162bd478f93ab4ee650
2021-12-09 18:28:47 +09:00
Treehugger Robot
39e3984e0d Merge "Remove test_min_api_level property" am: ea8b7771f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1905090

Change-Id: I99b7c13ab9456fecab95e8f3fbe754000babc2a4
2021-12-09 06:06:51 +00:00
Treehugger Robot
ea8b7771f1 Merge "Remove test_min_api_level property" 2021-12-09 05:51:25 +00:00
Colin Cross
730e3f6139 Set prebuiltCommon.installedFile for apex_set modules
apex_set modules failed to set prebuiltCommon.installedFile, which
caused LOCAL_SOONG_INSTALLED_MODULE to be empty and base_rules.mk
to create a duplicate install rule.  Set it to the path to the
apex file installed by Soong.

Bug: 204136549
Bug: 209867137
Test: m SOONG_CONFIG_art_module_source_build=false
Change-Id: Ia7fec09598823343242ebd44f1732e6bba21d027
2021-12-09 05:24:15 +00:00
Colin Cross
11f79516e2 Merge "Don't panic when DevicePrimaryArchType is called in a host only build" am: 9f5a9d1d54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1915495

Change-Id: I5a485022996f614ad133d4b2fcf1a1310b00535f
2021-12-09 04:30:49 +00:00
Treehugger Robot
da20b5d233 Merge changes I5ba5e518,Icdf30c4d am: c0bd6986e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914033

Change-Id: I1b40aec433478d0ddf3342e2727b19b566e8a088
2021-12-09 04:30:38 +00:00
Colin Cross
9f5a9d1d54 Merge "Don't panic when DevicePrimaryArchType is called in a host only build" 2021-12-09 04:18:17 +00:00
Treehugger Robot
c0bd6986e5 Merge changes I5ba5e518,Icdf30c4d
* changes:
  Handle substitution references in mk2rbc
  Support if expressions in mk2rbc
2021-12-09 04:12:32 +00:00
Cole Faust
c36c962670 Handle substitution references in mk2rbc
Bug: 201700692
Test: go test
Change-Id: I5ba5e51848e795e39f1f65dc153e4c1530066860
2021-12-08 17:32:57 -08:00
Dan Willemsen
d4105fcf60 Support macOS 12 SDK am: e3d50bfba9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914488

Change-Id: Ic9151d4925c9671684dfb7eb3ddeea3c9d6adb1b
2021-12-09 01:18:51 +00:00
Justin Yun
d396515482 Remove test_min_api_level property
Replace the test_min_api_level property with
test_options.min_shipping_api_level.

Bug: 187258404
Test: build
Change-Id: Ifbac62f389226ed690f0ec03b9cc0845132ae885
2021-12-09 00:16:41 +00:00
Colin Cross
c53c37fad1 Don't panic when DevicePrimaryArchType is called in a host only build
Check the length of c.Targets[Android] before getting the first
element, and return Common if the length is set.  Fixes a panic
when a tradefed_binary is defined in a host-only build.

Test: aosp-build-tools build
Change-Id: I89f1dd13aa1aff5eb7d39e0b66eeedcb7d930fa0
2021-12-08 15:42:22 -08:00
Colin Cross
b674b43656 Add dependency license annotations
Add annotations to dependency tags that are dynamic or classpath
linkage.

Bug: 207445310
Test: m checkbuild
Change-Id: Ife89b8f234aa40c380c721eda7dd18cab697fbb3
2021-12-08 15:08:59 -08:00
Colin Cross
3dd2ff28ed Build license metadata files in Soong
Soong has enough information to build the license metadata files
without resorting to the fixups required in Make.

Bug: 207445310
Test: m checkbuild
Change-Id: I8e74108376162b8fdb87ba098ebe94350aa1f7c4
2021-12-08 15:08:59 -08:00
Colin Cross
1c35f243c5 Escape Host*Variable contents
There are tests with "$" in the name, which becomes part of the
path.  Escape Host*Variable so that the path to a host binary
in a test doesn't get treated as a ninja variable.

Test: genrule_test.go
Change-Id: Ie50b13e94d8a30743c70b7f7c28bbab8afa73e5f
2021-12-08 15:08:59 -08:00
Usta
fe201fe158 The type assertion of DefaultableModule as Module is redundant
Test: m nothing
Bug: n/a

Change-Id: I5f7eea47a2f2bc81a0a5b9314e6a452c38226067
2021-12-08 18:03:23 -05:00
Dan Willemsen
1bd7543d6e Merge "Add Darwin x86_64+arm64 universal binary support" am: ce69757379
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1884611

Change-Id: I54226fc10b6e7265c9378df3e9634c793a61a12e
2021-12-08 22:59:34 +00:00
Christopher Parsons
3d8018643c Merge "Print number of converted modules" am: 212df74a32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913917

Change-Id: I39bf688e7a9a8922b41c193654effc289d39568f
2021-12-08 22:58:36 +00:00
Dan Willemsen
e3d50bfba9 Support macOS 12 SDK
Test: build w/Xcode 13.1
Change-Id: I9062b8045c4b02551aeeff06f4d7416c766e53a6
2021-12-08 22:12:49 +00:00
Dan Willemsen
ce69757379 Merge "Add Darwin x86_64+arm64 universal binary support" 2021-12-08 21:08:43 +00:00
Christopher Parsons
212df74a32 Merge "Print number of converted modules" 2021-12-08 18:48:51 +00:00
Yuntao Xu
139c0dd6db Merge "Add tests for converting license in androidmk" am: ab9f3a2bc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1900000

Change-Id: I26aab4a3ceb8c10a7999c91688dcc424184766bb
2021-12-08 18:14:09 +00:00
Treehugger Robot
3bcefabfeb Merge changes I08ec0b44,I79b5a1fc,I469d6558 am: 6abfb33784
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907862

Change-Id: I8d132015e8cbd7c239dc044dd2e6c0bf95665bc6
2021-12-08 18:13:49 +00:00
Allen Hair
952ebe85f0 Merge "Revert "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty"" am: 9df0fa5e63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914027

Change-Id: Ia35a8a3e1094d2d7c3355e66395dfa7b6880ead7
2021-12-08 18:12:54 +00:00
Yuntao Xu
ab9f3a2bc5 Merge "Add tests for converting license in androidmk" 2021-12-08 18:03:18 +00:00
Cole Faust
4eadba7438 Support if expressions in mk2rbc
Bug: 201700692
Test: go test
Change-Id: Icdf30c4d625d81974db946bd91660a29a0373ac7
2021-12-08 10:00:14 -08:00
Treehugger Robot
6abfb33784 Merge changes I08ec0b44,I79b5a1fc,I469d6558
* changes:
  Allow java_sdk_library in an APEX to have higher min_sdk_version.
  Perform CheckMinSdkVersion for java_sdk_library.
  Add MinSdkVersion(ctx) method to ModuleWithMinSdkVersionCheck interface.
2021-12-08 17:58:24 +00:00
Allen Hair
9df0fa5e63 Merge "Revert "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty"" 2021-12-08 17:54:57 +00:00
Chris Parsons
91b81f0b50 Print number of converted modules
Previously this was equal to the number of generated targets, but with
recent cc_library changes, we now sometimes generate more than one BUILD
target for a single module. Thus, converted module count is a more
useful metric.

At time of writing, this outputs:
`Converted 390 Android.bp modules to 453 total generated BUILD targets.
Included 4 handcrafted BUILD targets. There are 45093 total Android.bp
modules.`

Test: m bp2build
Change-Id: I7d68880dd4c6bf649ca753837a7f3a9c0d73753a
2021-12-08 11:39:07 -05:00
Vladimir Marko
7e556310b9 Merge "Stop installing a profile into an APEX if profiles are disabled." am: edd6fde587
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913479

Change-Id: Ic8051e916e4b6679c626ff4086b8d90b611fd012
2021-12-08 15:48:19 +00:00
Vladimir Marko
edd6fde587 Merge "Stop installing a profile into an APEX if profiles are disabled." 2021-12-08 15:29:14 +00:00