Commit Graph

8087 Commits

Author SHA1 Message Date
Zi Wang
78ffdd47a6 Move jarjar repackage action before combine action
With this change, the jarjar repackage actions are only on
the local classes of each module instead of the combined jar
that contains the static libs. The static libs don't need
jarjar repackage action on this module level because it has
been repackaged when building itself.

This change also removes the skip_jarjar_repackage property
since it's incompatible with this change. Actually skipping
jarjar repackage on a dep may result in incomplete repackage
on the module output.

Test: CI and observing the build time of SystemUIGoogle
Bug: 328067025
Ignore-AOSP-First: Will cp to aosp
Change-Id: I476d959af025c46d2ba6d3f48ea378a086666a33
2024-03-21 11:48:26 -07:00
Treehugger Robot
2a1e98dc60 Merge "Revert^9 "Enable dex container (DEX v41) for the whole system"" into main am: 84fedd36a4 am: 16ebf41398
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005894

Change-Id: Ic30a3902facd682af2d91bfe70650c526098d6e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 01:51:48 +00:00
Treehugger Robot
84fedd36a4 Merge "Revert^9 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-19 01:20:15 +00:00
Yuncheol Heo
113654faca Revert^9 "Enable dex container (DEX v41) for the whole system"
This reverts commit b92a4e1ca9.

Reason for revert: tracking the test failure b/329907267

Change-Id: Id3fa8471f073e0ec705fd0aba653b032ff82f9ad
2024-03-18 17:41:12 +00:00
Spandan Das
a249574eed Merge "Support mechanism to select a specific version of module sdk prebuilt" into main am: c36d579c2b am: 91c8756bd2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005213

Change-Id: If71c7c2184bd902adb32651110ce295c675bb328
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-18 16:45:15 +00:00
Spandan Das
c36d579c2b Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-03-18 15:55:51 +00:00
Spandan Das
e4c911e6fc Support mechanism to select a specific version of module sdk prebuilt
This CL is the platform_compat_config equivalent of aosp/2928483.

{prebuilt_}_platform_compat_config are collated by
`global_compat_config` via a singleton. The collated data is then used
in some CTS tests. At ToT, we ensure that the collation ignores the
platform_compat_config of prebuilt when source is selected, and vice
versa.

With trunk stable, multiple versions of prebuilt apexes and prebuilt
platform compat configs might exist in the tree. This CL uses
`Source_module_name` to hide the platform compat configs of the
unselected prebuilt apexes.

Bug: 322175508

Test: Added a unit test
Change-Id: Iafdde8fc0458b37b3ccde25433070936f144915c
2024-03-16 01:41:12 +00:00
Treehugger Robot
7d53941629 Merge "Create rule to generate the exportable api files when checkapi is disabled" into main am: ce1b16313e am: 7793b9460e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3003278

Change-Id: Ib01a8d6bfb9f7469f1e574975b8911e8687cd084
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-16 00:35:51 +00:00
Treehugger Robot
ce1b16313e Merge "Create rule to generate the exportable api files when checkapi is disabled" into main 2024-03-15 23:58:13 +00:00
Jihoon Kang
36c3d96b65 Create rule to generate the exportable api files when checkapi is disabled
WITHOUT_CHECK_API environment variable enables the checkapi to be
removed from the critical path. The variable is rarely used within AOSP,
but the downstream vendors may depend on it, in order to improve the
build performance given that the api signature file through metalava is
a resource costly task.

Currently, the exportable api files / removed api files are not
generated when checkapi is disabled, but a module may depend on the
exportable api files when a checkapi is disabled. In order to prevent
the missing build rules error in this case, generate the rule to copy
the checked in api file / removed api file to the exportable api file /
removed api file to prevent build errors.

This change also fixes the error message when the OutputFiles(string)
api file is null, to correctly inform the user the error.

Test: m BUILD_FROM_SOURCE_STUB=true WITHOUT_CHECK_API=true && inspect ninja path and verify that "non-updatable-exportable-current.txt" depends on the generated exportable api file.
Bug: 329374072
Change-Id: I24f88d450fb46b6ea9d5920d83617d8228edd34b
2024-03-15 22:30:56 +00:00
David Srbecky
416175d857 Merge "Revert^8 "Enable dex container (DEX v41) for the whole system"" into main am: d10d54af71 am: a561fc032a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2921345

Change-Id: I5a174f90f084a3d7b916b2d4ec473a2de7e53be5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 16:43:09 +00:00
David Srbecky
d10d54af71 Merge "Revert^8 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-15 15:42:48 +00:00
Treehugger Robot
1deecc9f9b Merge "Delete jmod workDir" into main am: f34748af55 am: 834f963398
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004910

Change-Id: I3ea7ec38a43b83045ed4cab86249b069f44b1423
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 03:10:25 +00:00
Treehugger Robot
f34748af55 Merge "Delete jmod workDir" into main 2024-03-15 02:35:04 +00:00
Cole Faust
7ef61d76f8 Delete jmod workDir
Files in this directory aren't exposed to the rest of the build, so
deleting them saves some space. The `jmod create` command was also
producing non-deterministic files, which are not relevant because
they're not used anywhere else, but it makes it easier to find
non-determinism that matters if we delete them.

Test: Presubmits
Change-Id: I5d57826b438368f24a7a2a7ab1ccd6c16f240124
2024-03-14 18:15:28 -07:00
Treehugger Robot
aca8f49e54 Merge "Generate info about the selected app variant in platform builds" into main am: 4e4939665e am: b2c91edbba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3002986

Change-Id: I9fd1efc56101e9eabcfaf92b1ae159b1d7203e09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 22:40:54 +00:00
Treehugger Robot
4e4939665e Merge "Generate info about the selected app variant in platform builds" into main 2024-03-14 22:05:43 +00:00
Treehugger Robot
9292a91a0c Merge "Add exports for JDK 21 to Kythe extractor" into main am: f11f786571 am: 9841e3cd05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004350

Change-Id: Ifa1bb5bb213caff7612ab85c06ad58e58349a5f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 19:32:02 +00:00
Yu Liu
b524871548 Merge "Validate aconfig libs are built with the correct modes." into main am: f509eba41d am: b6f0bc02b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989874

Change-Id: Ia0e31489f3d8cab59c9b18b9f5e875b03030947e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 19:30:48 +00:00
Treehugger Robot
f11f786571 Merge "Add exports for JDK 21 to Kythe extractor" into main 2024-03-14 18:43:02 +00:00
Yu Liu
f509eba41d Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:12 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
This is a followup to aosp/2999198 and adds information about apps.

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

Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
  build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
  `android_app_import`
- All app module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source app module types

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 317K Mar 11 23:46 out/soong/prebuilt_info.json

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

Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-14 18:12:30 +00:00
Sorin Basca
79b7ca1e7a Add exports for JDK 21 to Kythe extractor
Change-Id: Ie977f08f8aee59ea21dcbfe7c9c07dc0dc535775
Fixes: 328877412
Test: TH
2024-03-14 16:59:49 +00:00
David Srbecky
b92a4e1ca9 Revert^8 "Enable dex container (DEX v41) for the whole system"
This reverts commit 43668c6f13.

Reason for revert: Reland

Bug: 317744117
Bug: 329465418
Test: Device boots
Change-Id: I4b0478030c6a4980f33087ec5764018295691bac
2024-03-13 18:49:34 +00:00
Treehugger Robot
21a3203cbf Merge "Use uncompressed dex for all preopted system targets" into main am: fd3921f6bb am: 70d0d2d7aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2956760

Change-Id: I76f277e8446796dcd1f713105477a43221d35aa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-12 03:15:55 +00:00
Treehugger Robot
fd3921f6bb Merge "Use uncompressed dex for all preopted system targets" into main 2024-03-12 01:43:32 +00:00
Sorin Basca
6c47e664cc 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 12:31:30 -07:00
Sam Saccone
3379d4e3d8 Merge "Revert "Switch to JDK 21"" into main am: bfa20d7e15 am: e93ae387e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2994633

Change-Id: Ibe79e815e6002c57e49794b2ebadd858dc5ccc57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-11 18:59:35 +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
Treehugger Robot
b08153e781 Merge "Switch to JDK 21" into main am: 092c3a56fb am: f30930f404
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920125

Change-Id: I5e89bce53c531700ad958fb583b2594e4d9168f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 19:36:23 +00: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
Yu Liu
67a28425a7 Validate aconfig libs are built with the correct modes.
Bug: 323071835
Test: Unit tests and manual tests.
Change-Id: I32de90826c7c8bb4d8495608e959d554820ab9a2
2024-03-07 18:51:16 +00:00
Zi Wang
5ae58dcabe Merge "Add property Skip_jarjar_repackage" into main 2024-03-07 17:44:36 +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
29b033724e Merge "Reverse order of transitive R.jar classpath entries" into main am: a7ee3e0482 am: 062f267f75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989233

Change-Id: I2c007077f05aa93ff5052a946950df990446e387
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-07 02:23:11 +00:00
Treehugger Robot
062f267f75 Merge "Reverse order of transitive R.jar classpath entries" into main am: a7ee3e0482
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989233

Change-Id: Icca0d53dcdccdc969f6f885060a3368059f17059
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-07 01:39:10 +00:00
Yangfan Deng
42a815d586 Merge "Add wear-sdk.impl to the InstrumentFrameworkModule list so that classes for wear-sdk.impl library can be exported inside jacoco-report-classes-all.jar" into main 2024-03-07 01:32:53 +00:00
Treehugger Robot
a7ee3e0482 Merge "Reverse order of transitive R.jar classpath entries" into main 2024-03-07 00:50:53 +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
yangfan deng
a90cd1e4b8 Add wear-sdk.impl to the InstrumentFrameworkModule list so that classes for wear-sdk.impl library can be exported inside jacoco-report-classes-all.jar
Ignore-AOSP-First: internal-only projects

Test: http://go/forrest-run/L55500030002341444
Bug: 298469315

Change-Id: Ib0943e8d472ee3005a6e240c83462b054c72f199
(cherry picked from commit 8e5dfaa98985a267278f17cf1600e3fb3668cfc5)
2024-03-06 05:39:19 +00:00
Ronald Braunstein
ab57b5546b Merge "Test_Module_Config soong implementation" into main am: eefca7373c am: 88763e8e40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2947425

Change-Id: I65875eb1790d9f41d5662a087b108ff5083257ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 05:26:02 +00: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
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