Commit graph

77365 commits

Author SHA1 Message Date
LaMont Jones
46d4218fd0 Merge "move CollectDependencyAconfigFiles to android" into main am: 4daed5a026 am: d4efb42433
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2883008

Change-Id: Ie1afa1c155f1750c41b387e65d2c9da1cd081c39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-20 00:33:55 +00:00
LaMont Jones
d4efb42433 Merge "move CollectDependencyAconfigFiles to android" into main am: 4daed5a026
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2883008

Change-Id: I4b1bda253715ce3d8e48c0f4fd7537f09eeb2605
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 23:47:42 +00:00
LaMont Jones
4daed5a026 Merge "move CollectDependencyAconfigFiles to android" into main 2023-12-19 23:07:50 +00:00
Victor Chang
becc7a90de Merge "Avoid circular dependency for the aconfig usage in libcore" into main am: a9d3293bf4 am: 8f7e78f8bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880848

Change-Id: I2fda8082a09a6eee3e737259b6770913ea5484b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 21:05:43 +00:00
Victor Chang
8f7e78f8bb Merge "Avoid circular dependency for the aconfig usage in libcore" into main am: a9d3293bf4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880848

Change-Id: I9e12749d85104b28d322c63c67fb8b1e65d679d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 20:46:38 +00:00
Victor Chang
a9d3293bf4 Merge "Avoid circular dependency for the aconfig usage in libcore" into main 2023-12-19 20:39:03 +00:00
LaMont Jones
aa005ae080 move CollectDependencyAconfigFiles to android
This needs to be called by some modules in android.

Bug: 308625757
Test: manual
Change-Id: I389fcfd88a3f4bd85a9218fdd4dd66d8a239bb67
2023-12-19 19:34:00 +00:00
Spandan Das
a173731d29 Merge changes I3323d993,I01cea895 into main am: 349ef87505 am: 2c5f3c7fc1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876754

Change-Id: Ib096242d10e90818fcf1e37e17ac98190a9922c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 19:21:45 +00:00
Spandan Das
2c5f3c7fc1 Merge changes I3323d993,I01cea895 into main am: 349ef87505
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876754

Change-Id: I96ccee0a2833651e4c99c6031e9924c7fef4da7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 18:49:55 +00:00
Spandan Das
349ef87505 Merge changes I3323d993,I01cea895 into main
* changes:
  Move validation from FindDeapexerProviderForModule to rdeps
  Move dexpreopt processing from java_*_import to prebuilt_apex
2023-12-19 18:08:19 +00:00
Treehugger Robot
2adf708ecd Merge "Revert "Show ETA only if it is smart status"" into main am: 2fd4783584 am: b8e45d8431
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2881848

Change-Id: I355a195eede3f35db7c9a5e21599c13bb8b964d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 17:26:11 +00:00
Treehugger Robot
b8e45d8431 Merge "Revert "Show ETA only if it is smart status"" into main am: 2fd4783584
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2881848

Change-Id: I83564c841dde7fc3d8ca1b5524d411a04820aa91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 16:53:44 +00:00
Treehugger Robot
2fd4783584 Merge "Revert "Show ETA only if it is smart status"" into main 2023-12-19 15:49:57 +00:00
Victor Chang
bf0175ee6a Avoid circular dependency for the aconfig usage in libcore
Bug: 316554963
Test: m droid
Change-Id: I6f45e585b8b656ef7ce1d51bbde0a44898198907
2023-12-19 14:22:07 +00:00
Mårten Kongstad
ab6c07a0b6 Fix broken sdk build (/bin/sh: 1: [[: not found) am: 0a0ea26c60 am: 9ecf7d0a5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880857

Change-Id: I7f63d55185dfd409617360cfc4e072cd0beddf94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 09:50:10 +00:00
Mårten Kongstad
9ecf7d0a5e Fix broken sdk build (/bin/sh: 1: [[: not found) am: 0a0ea26c60
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880857

Change-Id: I766134c15a32fb1347a5c10a31df204d4e13848e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 09:19:20 +00:00
Mårten Kongstad
0a0ea26c60 Fix broken sdk build (/bin/sh: 1: [[: not found)
The CL aosp/2878135 introduced a new shell command to be executed as
part of `m sdk dist` builds. The new command incorrectly used bash
syntax for conditionals, i.e. `if [[ ... ]]` (double [[]]) instead of
the POSIX compliant `if [ ... ]` (single []).

This broke the sdk build on systems where /bin/sh is not a symlink to
/bin/bash:

  /bin/sh: 1: [[: not found
  error: lstat out/soong/.intermediates/exported_java_aconfig_library.jar.tmp: file does not exist

Fix the breakage by using POSIX shell syntax instead.

Bug: 316933458
Bug: 311151343
Test: m sdk dist
Change-Id: I7de53261674a8f54c4ecacf0e27aecbafcfa4048
2023-12-19 08:20:51 +01:00
Jeongik Cha
b6d5ff505d Revert "Show ETA only if it is smart status"
Revert submission 2853087

Reason for revert: not necessary

Reverted changes: /q/submissionid:2853087

Change-Id: I747948ce5bec656851bf9a50e136bf7e3aae8df6
2023-12-19 05:44:26 +00:00
Yu Liu
c54dd4848e Merge "Properly package aconfig files for product and system_ext partitions" into main am: 4c27146e4c am: 1c6b1fb260
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880492

Change-Id: I33f8b518186a8aaf7f816d9289636a23c9dcb23b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 01:56:59 +00:00
Yu Liu
1c6b1fb260 Merge "Properly package aconfig files for product and system_ext partitions" into main am: 4c27146e4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2880492

Change-Id: I6d9b55c441b71e802616dc8a3dabab993987ada7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 01:27:06 +00:00
Yu Liu
4c27146e4c Merge "Properly package aconfig files for product and system_ext partitions" into main 2023-12-19 00:40:03 +00:00
Colin Cross
503d8ef094 Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main am: 51428c451a am: de05db0114
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876767

Change-Id: I1f74efab2d1797e56a15713c687c26df7cf9a5f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-19 00:04:26 +00:00
Spandan Das
fae468ef14 Move validation from FindDeapexerProviderForModule to rdeps
FindDeapexerProviderForModule raises an exception if multiple apexes in
the tree has an export dep on the java module. In prepartation to
support multiple prebuilts, move this error check out of
FindDeapexerProviderForModule and into rdeps. i.e. raise an exception
only if an rdep calls DexJarBuildPath

- This should be a no-op for now.
- In the short-term future, a java import module will be allowed to have
  multiple deapexers. An error will be raised if anyone actually tries
  to depend on the dexjar
- In the long-term future, this function will be removed. All processing
  will be done at the prebuilt apex level and not at the prebuilt java
  library level

Since this check now happens in the moduleCtx of rdeps, add some
additional props to unit tests to ensure that it does not exit early on
unrelated validation checks (e.g. hidden_api prop is not set)

Test: go test ./apex ./java
Bug: 308790457

Change-Id: I3323d993c1ea8f43305834cae8e65b6fe41dfefd
2023-12-18 23:19:47 +00:00
Spandan Das
2069c3f74d Move dexpreopt processing from java_*_import to prebuilt_apex
dexpreopt of apex system server from prebuilts involves three soong
modules
1. prebuilt_apex / apex_set
2. an internal deapexer module created by the prebuilt apex
3. java_import/java_sdk_library

(3) acts as a shim for the deapexer to set the dexjar extracted from the
prebuilt apex. This methodolody requires a 1:1 correspondence across the
three modules

This breaks down when we have multiple versions of the same prebuilt
apex in the tree. In preparation for this, move the dexpreopt
processing from (3) to (1). Each prebuilt_apex will create the necessary
rules for dexpreopting the jars deapexed from itself. In the future,
apex_contributions will be used to pick which service-foo.{odex|.vdex} to
install depending on which prebuilt apex is selected.

Implementation details
- Embed dexpreopter in prebuiltApex structs so that this module type can
  register the dexpreopt rules. Since a single apex can have multiple
  system server jars, this also requires creating an additional scope in
  dexpreopt.go to prevent name collisions
- Add the dexpreopt modules as required in initApexFilesForAndroidMk
- Add the depreopt modules to androidMk in AndroidMkEntries. Drop the
  equivalent from java_import and java_sdk_library_import

Bug: 308790457
Test: existing soong unit tests
Test: lunch cf_x86_64_phone-next-userdebug && m out/target/product/vsoc_x86_64/system/apex/com.google.android.adservices.apex
Test: Verified that the above command installs
/out/target/product/vsoc_x86_64/system/framework/oat/x86_64/apex@com.android.adservices@javalib@service-adservices.jar@classes.{odex|vdex} and the equivalent files of service-sdksandbox

Test: presubmits

Change-Id: I01cea8956d2857fb864b415e73d3d2686d069b5e
2023-12-18 23:17:26 +00:00
Colin Cross
de05db0114 Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main am: 51428c451a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876767

Change-Id: I1829e71f021721ec043bda19f12f3fee34044bba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 23:15:42 +00:00
Yu Liu
22e32f1b0b Properly package aconfig files for product and system_ext partitions
Bug: 311173471
Test: Unit tests
Change-Id: Iac60695beb6529139965e4bb24024df6ce278fb2
2023-12-18 14:44:34 -08:00
Colin Cross
51428c451a Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main
* changes:
  Convert ModuleProvder to generic providers API
  Convert OtherModuleProvider to generic providers API
  Convert Provider to generic providers API
  Convert SetProvider to generic providers API
2023-12-18 22:43:45 +00:00
Mårten Kongstad
95cef85f44 Merge "Only include exported flags in android-flags.jar" into main am: 8070c4b457 am: 736f453ddc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2878135

Change-Id: I58551e6d4857393ba99f33fb36454f7fcbec1529
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 21:32:23 +00:00
Mårten Kongstad
736f453ddc Merge "Only include exported flags in android-flags.jar" into main am: 8070c4b457
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2878135

Change-Id: Iec7dbbd0b685a6be473bde2d8c79780e5a035c1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 21:01:16 +00:00
Mårten Kongstad
8070c4b457 Merge "Only include exported flags in android-flags.jar" into main 2023-12-18 20:31:31 +00:00
Colin Cross
9d661502e6 Merge changes from topic "provider_generics" into main am: b2c65a26d6 am: 7e3f9b43de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876763

Change-Id: I29fea474a3cdbc0b61024963031268131dbdc451
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 20:11:22 +00:00
Colin Cross
ea6c39e836 Use generics for providers API am: 3c0a83d19f am: a471bff29b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876762

Change-Id: Ie1623554ae4d3690a4616d7835b2a2cdd2ecd204
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 20:11:16 +00:00
Colin Cross
4fbafd5bda Fix TestAarImportProducesJniPackages/aar-no-jni am: e8eeec913f am: a5458ee6ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876761

Change-Id: I8fbc30d8f9f52b7a2b9b0231982313555c5a18ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 20:11:10 +00:00
Colin Cross
7e3f9b43de Merge changes from topic "provider_generics" into main am: b2c65a26d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876763

Change-Id: Idd45d802713d4395abe9c233e71dc39f4d5b691e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:33 +00:00
Colin Cross
a471bff29b Use generics for providers API am: 3c0a83d19f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876762

Change-Id: I27279b2ebf557d4f9395cc713b8174f00a1ddc2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:31 +00:00
Colin Cross
a5458ee6ea Fix TestAarImportProducesJniPackages/aar-no-jni am: e8eeec913f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876761

Change-Id: I385316f548bc58bb67ff41051eb7ad7eb1a78f60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:25 +00:00
Colin Cross
b2c65a26d6 Merge changes from topic "provider_generics" into main
* changes:
  Convert NewProvider/NewMutatorProvider to generic providers API
  Use generics for providers API
  Fix TestAarImportProducesJniPackages/aar-no-jni
2023-12-18 19:15:39 +00:00
Mårten Kongstad
1258acfed3 Only include exported flags in android-flags.jar
The android-flags.jar file is consumed by apps built outside the
platform. These apps should only have access to exported flags (as
defined by the flag_declaration `is_exported` field).

Teach soong to filter out non-exported flags when generating
android-flags.jar.

Bug: 311151343
Test: m sdk dist # manually verify that $(gettop)/out/dist/android-flags.jar only contains exported flags
Change-Id: If66321fcffd920040dae3d99bd7ef69ff6925b18
2023-12-18 13:47:57 +01:00
Ludovic Barman
91059c6932 [automerger skipped] Merge "Rust protobuf 2->3: Update build system" into main am: cd11c9535f am: 1e95f792a6 -s ours
am skip reason: Merged-In I1d07c433aca41ccfe2e710821cf930c413dc12d6 with SHA-1 28216dbe8d is already in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817733

Change-Id: Ia728d2dbe61f80446d3383a4df22ad5443f17d12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-16 07:28:42 +00:00
Ludovic Barman
1e95f792a6 Merge "Rust protobuf 2->3: Update build system" into main am: cd11c9535f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817733

Change-Id: Id22737ab06355a187d7defa997457e7c7af1aa4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-16 06:54:37 +00:00
Ludovic Barman
cd11c9535f Merge "Rust protobuf 2->3: Update build system" into main 2023-12-16 06:20:12 +00:00
Cole Faust
ce07800238 Merge "Sandbox camera-its" into main am: db0eeb5bdd am: 9582ba1e8d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2874576

Change-Id: Ib49777ce616f02889d69cb41b0fa50a0fa8e6e0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 22:51:58 +00:00
Cole Faust
9582ba1e8d Merge "Sandbox camera-its" into main am: db0eeb5bdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2874576

Change-Id: I07c6fbc970dfadac0e4f2b38a3e84dcac1d99b39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 22:22:05 +00:00
Cole Faust
db0eeb5bdd Merge "Sandbox camera-its" into main 2023-12-15 21:57:29 +00:00
Chris Antol
e5e4ec833f Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main am: 6482cb97cd am: 7752fc2274
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876730

Change-Id: Icba949852c36f4cfd1fa3ab100c3218ff40f768e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 20:12:09 +00:00
Chris Antol
7752fc2274 Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main am: 6482cb97cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876730

Change-Id: I0f11e266d94823f217cae73f81717bcfc54a1e01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 19:38:28 +00:00
Chris Antol
6482cb97cd Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-15 19:01:34 +00:00
Chris Antol
a33691288e Revert^5 "Enable dex container (DEX v41) for the whole system"
This reverts commit d45836eb38.

Reason for revert: Still breaks tests

Bug: 314212435
Change-Id: I35867878c9a8b2aa3d64092a5326c42191569adc
2023-12-15 18:15:51 +00:00
David Srbecky
58ca20aa7b Merge "Revert^4 "Enable dex container (DEX v41) for the whole system"" into main am: a6bc7c87bd am: 354153aa2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2859465

Change-Id: I9098be31c9a6bc5c15dd65b5d483e41e81418298
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 14:05:08 +00:00
David Srbecky
354153aa2e Merge "Revert^4 "Enable dex container (DEX v41) for the whole system"" into main am: a6bc7c87bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2859465

Change-Id: I896f0dedd5bb75eac96d75d470297ff102a7ab4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 13:34:38 +00:00