Commit graph

81236 commits

Author SHA1 Message Date
Treehugger Robot
eb0f771676 Merge "Let header ABI checker load core variants' version scripts" into main 2024-03-13 02:09:59 +00:00
Spandan Das
86cc1e896b Merge "Generate info about the selected apex variant in platform builds" into main 2024-03-13 01:13:21 +00:00
Treehugger Robot
66e8a75700 Merge "Add defaults support for apex_contributions module type" into main 2024-03-12 20:35:12 +00:00
Spandan Das
a747d2ec48 Generate info about the selected apex variant in platform builds
out/soong/prebuilt_info.json will contain information about whether
source or prebuilt of an apex was used. If prebuilt is used, it will
print the path to its prebuilt_info file. This file will be
used to pick a matching set of MTS test prebuilts.

Each apex will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional

Implementation details
- Introduce a new `prebuilt_info` prop to `apex_set` and `prebuilt_apex`
- All apex module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source apex module types
- Create a `apex_prebuiltinfo_singleton` that visits all apex modules.
  It uses `IsHideFromMake` to filter out the unselected variants of a
  specific apex. This new singleton will create prebuilt_info.json
- Dist prebuilt_info.json for droidcore

Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 25K Mar 11 23:46 out/soong/prebuilt_info.json

Test: #modified trunk_staging.locally to select prebuilts of some
mainline modules. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately

Bug: 327480225

Change-Id: I65c73010142b034ad1d2b3d05ef493be034e8d74
2024-03-12 18:04:55 +00:00
Andus Yu
2b8928444d Merge "Make sure RBE socket address is under character limit" into main 2024-03-12 13:45:51 +00:00
Hsin-Yi Chen
f1f276c904 Let header ABI checker load core variants' version scripts
Header ABI checker dumps the ABI from core variants and filters it by
version scripts. Ideally it should load different version scripts for
LLNDK, NDK, APEX, etc, but the build rules have not been completed. The
current solution is to load core variants' version scripts. It works
for every existing library because a library's variants share one
version script.

Test: make
Bug: 329078703
Change-Id: I4e26275e24daf93c7d3bb7e70b542a1197ae2129
2024-03-12 04:40:59 +00:00
Treehugger Robot
64342427b8 Merge "Revert "Include all_aconfig_declarations in docs dist"" into main 2024-03-12 02:58:18 +00:00
Treehugger Robot
9e11c2ed14 Merge "Make syspropRustGenRule work with absolute paths" into main 2024-03-12 02:05:31 +00:00
Treehugger Robot
fd3921f6bb Merge "Use uncompressed dex for all preopted system targets" into main 2024-03-12 01:43:32 +00:00
LaMont Jones
60d4307605 Revert "Include all_aconfig_declarations in docs dist"
This reverts commit 90c2af97ed.

Reason for revert: Includes too many flags.  The on-device copy of aconfig declarations must be **only** those that are used by code on the device.  `all_aconfig_declarations` is every aconfig flag in the source tree, and cannot be placed on the device.

Change-Id: Id7ac61c0805825b4ca27fffe84a48f95e3c682b2
2024-03-11 20:35:14 +00:00
Treehugger Robot
d69b79e295 Merge "Include all_aconfig_declarations in docs dist" into main 2024-03-11 19:28:50 +00:00
Sorin Basca
7f4fa82732 Merge "Revert^2 "Switch to JDK 21"" into main 2024-03-11 18:40:04 +00:00
Sorin Basca
5dfa238f22 Revert^2 "Switch to JDK 21"
This reverts commit b832ae19d8.

Reason for revert: Reland Switch to JDK 21 when related issues are resolved.

Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
2024-03-11 17:23:06 +00:00
Sam Saccone
bfa20d7e15 Merge "Revert "Switch to JDK 21"" into main 2024-03-11 17:05:56 +00:00
Aleksei Vetrov
f4775ca238 Make syspropRustGenRule work with absolute paths
This rule should be able to work with OUT_DIR set as absolute path,
which is used in "development/tools/ndk/update_ndk_abi.sh".

The problem appears if sysprop file itself is generated and
"syspropFile.String()" returns an absolute path, which is not accepted
as path component for "PathForModuleGen".

The fix is to use "android.GenPathWithExt" like in "syspropJavaGenRule".

Fixes: 328506541
Test: TreeHugger
Test: development/tools/ndk/update_ndk_abi.sh
Change-Id: Ia1e9a0ad51ebd957be97c48f5e1cf0e06a0da0ee
2024-03-11 14:02:08 +00:00
Mårten Kongstad
90c2af97ed Include all_aconfig_declarations in docs dist
Include all_aconfig_declarations in the docs dist directory, in both
binary protobuf (for machine consumption) and text protobuf (for human
consumption) format.

Bug: 324281288
Test: m docs dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: I5756b913aeb44ee4f3f9ab64ae5038fc64557b5f
2024-03-11 14:07:21 +01:00
Treehugger Robot
b952c84841 Merge "Allow PrevVendorApiLevel to be less than 34" into main 2024-03-11 04:56:59 +00:00
Cole Faust
8c36631fa0 Remove unused code in update.go
Test: m nothing
Change-Id: Idae97a203bfcf451456766c0b6eb5430959c0ade
2024-03-08 10:58:32 -08:00
Cole Faust
f3fcc952f2 Merge "Replace generatedFile with android.WriteFileRule" into main 2024-03-08 18:49:59 +00:00
Treehugger Robot
385138a836 Merge "Remove starlark_import" into main 2024-03-08 18:32:09 +00:00
Treehugger Robot
181a27986c Merge "Optimize buildPropFile()" into main 2024-03-08 10:24:50 +00:00
Jihoon Kang
48872f5443 Merge "Fix missing credential error message" into main 2024-03-08 06:34:50 +00:00
Cole Faust
ed158f4d1c Replace generatedFile with android.WriteFileRule
Fewer lines of code and more performant.

Test: Presubmits
Change-Id: If09dae6aba67c19106d4cbf058a60bbbc27f78d2
2024-03-07 16:41:27 -08:00
Jihoon Kang
70de2c04a7 Fix missing credential error message
LOAS credential enforcement is already taking effect, not in the future.
Update the warning message accordingly.

Test: gcertdestroy && m and inspect error message
Bug: 318506452
Change-Id: I857f44b265c454beaffb9e662bd318aeb29f6cdb
2024-03-08 00:11:20 +00:00
Cole Faust
cec230a0eb Optimize buildPropFile()
Use android.WriteFileRuleVerbatim instead of a custom RuleBuilder
with echo commands.

Test: m nothing --no-skip-soong-tests
Change-Id: I9734305cbb404fd2ae841af2525f0db235622315
2024-03-07 15:51:12 -08:00
Sorin Basca
b832ae19d8 Revert "Switch to JDK 21"
This reverts commit 5a2e36b755.

Reason for revert: Preparing revert to have it ready in case of breakages relating to using JDK 21.

Change-Id: I153c4933f6891c7fff43e522a4d128acad6b6d47
2024-03-07 21:22:00 +00:00
Treehugger Robot
092c3a56fb Merge "Switch to JDK 21" into main 2024-03-07 19:36:28 +00:00
Cole Faust
256cfbee24 Remove starlark_import
This is no longer used since the roboleaf cancellation.

Bug: 315353489
Test: m nothing --no-skip-soong-tests
Change-Id: Ie6ee093c2810498306ea4a2288050eed17a35357
2024-03-07 10:53:41 -08:00
Zi Wang
5ae58dcabe Merge "Add property Skip_jarjar_repackage" into main 2024-03-07 17:44:36 +00:00
Cole Faust
fb8356c4c0 Merge "Replace starlark_import with hardcoded map" into main 2024-03-07 17:39:35 +00:00
Cole Faust
140180dd5b Merge "Select statements" into main 2024-03-07 17:39:27 +00:00
Xin Li
08bef285d8 Merge "Merge Android 14 QPR2 to AOSP main" into main 2024-03-07 06:41:10 +00:00
Treehugger Robot
a7ee3e0482 Merge "Reverse order of transitive R.jar classpath entries" into main 2024-03-07 00:50:53 +00:00
Cole Faust
5a231bd819 Select statements
See the blueprint cl for more information.

Things still to do:
 - Support selecting on product variables and
   variants
 - Test/Support property struct reflection tags
   like arch_variant, path, and variant_prepend
 - Test that selects combine well with existing
   configurability mechanisms like arch:, target:,
   multilib:, python's version:, etc.

Bug: 323382414
Test: go tests
Change-Id: If5d1ea1ad0c4ebabffaea91d62e1a1c6f926a793
2024-03-06 16:03:01 -08:00
Cole Faust
37bfb07722 Replace starlark_import with hardcoded map
With roboleaf being cancelled, we don't need the api levels to be
present in starlark.

Bug: 315353489
Test: Presubmits
Change-Id: I21ea61ced00a5b0ae066a9ca99a88a512bf115ac
2024-03-06 15:59:18 -08:00
Andus Yu
c917eb8207 Make sure RBE socket address is under character limit
Check that socket address paths are less than the character limit - 2 since absolute paths are prefixed with //, which is included in the character limit.

b/308986536

Change-Id: I3055b8bb8cdae00aafd66c51fdc8421b9cc5f21f
2024-03-06 21:54:57 +00:00
Zi Wang
4332cd1cae Add property Skip_jarjar_repackage
If this property is set to true on a module, this module will
not have jarjar repackaging.

Test: CI
Bug: 327009143
Ignore-AOSP-First: Will cp to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9bdd4228cb959d46a60610f3b0eb9b52b95a73ad)
Merged-In: I9384c9c25ce581ac00d309a188cf7533eb2e44a6
Change-Id: I9384c9c25ce581ac00d309a188cf7533eb2e44a6
2024-03-06 18:58:05 +00:00
Spandan Das
471d068893 Add defaults support for apex_contributions module type
Bug: 326246905
Test: go build ./android

Change-Id: I8be21594465d81c99c216b0fcbf9996aed46c209
2024-03-06 17:41:04 +00:00
Xin Li
7e46832a1c Merge Android 14 QPR2 to AOSP main
Bug: 319669529
Merged-In: I0b63516865233df0bf125a2ee4098769a8991ecd
Change-Id: Ib1f0f88fd2a20a695c749b228bda0002fcbc3331
2024-03-06 09:29:45 -08:00
Ronald Braunstein
88763e8e40 Merge "Test_Module_Config soong implementation" into main am: eefca7373c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2947425

Change-Id: I0b63516865233df0bf125a2ee4098769a8991ecd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 04:40:42 +00:00
Ronald Braunstein
eefca7373c Merge "Test_Module_Config soong implementation" into main 2024-03-06 04:08:23 +00:00
Treehugger Robot
c2599194ee Merge "enable exportable check" into main am: d3a0ea94ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989053

Change-Id: Icf264db1cc4aec61b4a28bb35ca1a06d7a0f05d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 01:48:48 +00:00
Treehugger Robot
d3a0ea94ba Merge "enable exportable check" into main 2024-03-06 01:10:49 +00:00
Ronald Braunstein
fce431652d Test_Module_Config soong implementation
New soong module type `TestModuleConfig`

This module type allows to write:
   test_module_config {
    name: "DerivedFrameworks1",
    base: "FrameworksServicesTests",
    include_filters: ["com.android.server.accessibility.FingerprintGestureDispatcherTest"],
  }

This goal is to put the test options (include_fitler in this case) in
Android.bp rather than TEST_MAPPING to be able to name a set of options
and to allow the CI to more precise about which part of a TestModule
might be failing.
In general, it is recommended to split up tests rather than use this
approach, but that isn't always feasible.

More details on project here:  https://docs.google.com/document/d/1MpA4BS6mTr-1D-K9MVmzdHkSufAvIkkM4gPEUglNodk/edit?tab=t.0
Migration plan here: https://docs.google.com/document/d/1x3w-BvKO3E-GbY8YOSBuzJC6-pkLkuhfjSyZ1hJQBYM/edit?tab=t.0

Some details of final output:

   * All the [data] files from Derived are the same as base.
   * The apk names is changed to be the Module name
   * The test options are added to .config file
   * test-file-name in the .config file (for base.apk) is changed to be
     new apk.
   * module-info.json is hand inspected between base and derived.
   * I added a .manifest file so future tools know what base is, if they
     need it.

We are working a mechanism to use a CAS so the zip of the testcases
won't explode. (however the trident disk image will get bigger)

% tree -ls out/target/product/shiba/testcases/DerivedFrameworks1 out/target/product/shiba/testcases/FrameworksServicesTests
[       4096]  out/target/product/shiba/testcases/DerivedFrameworks1
├── [       4096]  arm64
│   └── [   72346281]  DerivedFrameworks1.apk
├── [      20887]  BstatsTestApp.apk
├── [       4096]  data
│   └── [        851]  broken_shortcut.xml
├── [       3157]  DerivedFrameworks1.config
├── [      12695]  JobTestApp.apk
├── [       8599]  MediaButtonReceiverHolderTestHelperApp.apk
├── [      16791]  SimpleServiceTestApp1.apk
├── [      16791]  SimpleServiceTestApp2.apk
├── [      16791]  SimpleServiceTestApp3.apk
├── [    1017540]  SuspendTestApp.apk
└── [         36]  test_module_config.manifest

[       4096]  out/target/product/shiba/testcases/FrameworksServicesTests
├── [       4096]  arm64
│   └── [   72346281]  FrameworksServicesTests.apk
├── [      20887]  BstatsTestApp.apk
├── [       4096]  data
│   └── [        851]  broken_shortcut.xml
├── [       2866]  FrameworksServicesTests.config
├── [      12695]  JobTestApp.apk
├── [       8599]  MediaButtonReceiverHolderTestHelperApp.apk
├── [      16791]  SimpleServiceTestApp1.apk
├── [      16791]  SimpleServiceTestApp2.apk
├── [      16791]  SimpleServiceTestApp3.apk
└── [    1017540]  SuspendTestApp.apk

Fixes: 314148134
Test: atest DerivedFrameworks1 DerivedFrameworks2
Test: m blueprint_tests
Change-Id: Ib73a3404557e0bd583b065f0cf2fd55fba9ccdbe
2024-03-06 00:38:56 +00:00
Treehugger Robot
b51fb7c159 Merge changes from topic "revert-2929615-JHGJGJFRRX" into main am: dc2b51f2ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989230

Change-Id: I9bf6b80eb908a98617bfbd32357874bf48b9b897
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 23:38:51 +00:00
Jihoon Kang
05b152f271 Revert "Generate runtime stubs in droidstubs" am: d40c591487
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989229

Change-Id: I5ec47c526dc411dea82104a91b61857e30d3c11f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 23:38:46 +00:00
Treehugger Robot
dc2b51f2ba Merge changes from topic "revert-2929615-JHGJGJFRRX" into main
* changes:
  Revert "Additional cleanup prior to adding the runtime stubs"
  Revert "Generate runtime stubs in droidstubs"
2024-03-05 22:55:29 +00:00
Zhi Dou
e11319d466 enable exportable check
If a library is built to mode exported, the flag declaration has to be
set with exportable true. The reason for this requirement is only flags
in the exportabel declarations will be repackaged. To prevent forgetting
adding this attribute, this exportable attribute is required to be set
for all exportable declarations.

Test: m
Bug: 310504781
Change-Id: I3ddafe0b212dabe86aa5000b1b76c7c412acc93c
2024-03-05 22:21:03 +00:00
Jihoon Kang
a11d679da2 Revert "Additional cleanup prior to adding the runtime stubs"
Revert submission 2929615

Reason for revert: b/328225000

Reverted changes: /q/submissionid:2929615

Merged-In: I29c605adb9401c9cb8b58646f2ae7b53b9a758e9
Change-Id: I29c605adb9401c9cb8b58646f2ae7b53b9a758e9
2024-03-05 21:34:18 +00:00
Jihoon Kang
d40c591487 Revert "Generate runtime stubs in droidstubs"
Revert submission 2929615

Reason for revert: b/328225000

Reverted changes: /q/submissionid:2929615

Merged-In: Ifbec11417103c96b37a4da18dfc9fda73f654d8f
Change-Id: Ifbec11417103c96b37a4da18dfc9fda73f654d8f
2024-03-05 21:27:53 +00:00