Commit Graph

8549 Commits

Author SHA1 Message Date
Zhi Dou
9612480ee2 Revert^2 "pass read new storage parameter to java codegen"
This reverts commit 848c6c939c.

Reason for revert: The real issue is fixed in another cl, not related to this one

Change-Id: Id12816206a16b17c23e3a53832d268f1600107b3
2024-07-30 20:26:49 +00:00
Satish Yalla
848c6c939c Revert "pass read new storage parameter to java codegen"
This reverts commit c980327853.

Reason for revert: Droidmonitor created revert due to b/356193768. Will be verifying through ABTD before submission.

Change-Id: Ifaaa33b07333683492bc54270b840df21bcd00ca
2024-07-30 03:56:25 +00:00
Zhi Dou
c980327853 pass read new storage parameter to java codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Test: m and check cf
Bug: 349874828
Ignore-AOSP-First: the previous change ag/26821089 submitted internally this one depends on that change. The added code will be removed after test mission
Change-Id: I95ad9457e6d9c07a5a5b3074045a383f004113a9
2024-07-26 23:11:27 +00:00
Makoto Onuki
04dbebc08f Merge "Support resource APKs" into main am: 7c52907acf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3190452

Change-Id: I1fa73034575f7628e124c7904d190d7f86ac9a79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-25 22:36:42 +00:00
Makoto Onuki
7c52907acf Merge "Support resource APKs" into main 2024-07-25 22:18:19 +00:00
Treehugger Robot
2cd13acd05 Merge changes from topic "fix-presigned-apk-validation" into main am: 38f97d7a08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3194336

Change-Id: Ic8bd8e7201aad8099924856bc9341e1c6874e29c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-25 21:39:39 +00:00
Makoto Onuki
3380f6deb3 Support resource APKs
- android_ravenwood_test can now have `resource_apk: "ANDROID_APP_MODULE"`.
This will copy the APK to the test directory as "ravenwood-res.apk".

- android_ravenwood_libgroup can now have `data: ["MODULE"]`.
We use this to add framework-res.apk (as `data:["framework-res"]`)
to the ravenwood runtime path.

Bug: 339614874
Test: m nothing --no-skip-soong-tests
Test: ATEST="atest --no-bazel-mode" $ANDROID_BUILD_TOP/frameworks/base/ravenwood/run-ravenwood-tests.sh
   Do it on both aosp/main and goog/main

Flag: EXEMPT: Host side change only

Change-Id: I36516fec068a6359688a1dbedcb10a49c4631441
2024-07-25 12:41:07 -07:00
Rashid Zaman
3bd28705f4 Fix presigned apk check for privileged apps
The validation checks that run for presigned apps currently expect that
privileged apps have uncompressed dex files but if
DONT_UNCOMPRESS_PRIV_APPS_DEXS is true (UncompressPrivAppDex false) this
doesn't have to be the case so make the validation consistent with this.
Also make TestAndroidAppImport_Preprocessed verify that extra arguments
to 'check_prebuilt_presigned_apk.py' are correct for both privileged and
non-privileged apps.

Test: m nothing --no-skip-soong-tests
Test: Add presigned, privileged android_app_import module with
compressed dex to PRODUCT_PACKAGES for aosp_cf_x86_64_phone,
lunch aosp_cf_x86_64_phone-trunk_staging-userdebug &&
m DONT_UNCOMPRESS_PRIV_APPS_DEXS=true no longer fails due to validation
error.

Change-Id: I7e22cf525cd9d99d1ecb24e4e2e99c3f9de48146
2024-07-25 12:04:26 -07:00
Rashid Zaman
5800d421c3 Convert TestAndroidAppImport_Preprocessed to test fixtures
In preparation for a subsequent CL convert the test to use test
fixtures.

Test: m nothing --no-skip-soong-tests
Change-Id: I12f3802419105c7ffc8e00e95a069432c6b99d53
2024-07-25 11:27:58 -07:00
Treehugger Robot
e6cf20d85f Merge "Add android.car.builtin to the Code Coverage instrumented list." into main am: 0cdc351829
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3192210

Change-Id: Ib78f8827e6dda2fcd8cec3bc6786f7d4aadf7124
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-24 22:42:40 +00:00
Filip Zakrzewski
c9f487b0e8 Add android.car.builtin to the Code Coverage instrumented list.
BUG=339901608

TEST=no

Change-Id: I3457dd843f3ebcefda4253b128ed142a7fa13e82
2024-07-24 04:27:45 +00:00
Treehugger Robot
3cbc46d2ee Merge "Specify Is_stubs_module property in top level sdk library" into main am: b137e55a39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3183620

Change-Id: I74f762eedf223efd6aa0c647711feaca34f36eb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-23 19:53:43 +00:00
Treehugger Robot
234f03b7ba Merge "Pass config files to metalava" into main am: b359e61d2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3187663

Change-Id: I11c2dcc3e495187c7461f214bc921b1c2aae4699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-23 19:53:15 +00:00
Treehugger Robot
b137e55a39 Merge "Specify Is_stubs_module property in top level sdk library" into main 2024-07-23 19:42:06 +00:00
Paul Duffin
278193669e Pass config files to metalava
Adds a filegroup "metalava-config-files" whose contents are passed to
Metalava using the `--config-file` option.

Bug: 354699349
Test: m checkapi
Change-Id: I1e246517c2ef678e41214c975aecee97f9faca67
2024-07-23 10:38:01 +01:00
Jihoon Kang
e4a9017327 Specify Is_stubs_module property in top level sdk library
java_sdk_library's "magic" will always resolve to stubs when either of
the following conditions are met:
- the module sets `api_only` property to "true": this signifies that
  the module does not create an implementation library, thus the "magic"
  always returns stubs
- the module sets `default_to_stubs` property set to "true": this
  signifies that the reverse dependencies outside of the same apex will
  always get the stubs, even when the rdep does not specify the
  sdk_version.

This change utilize this information and mark the top level sdk_library
as a stubs module when any of the above conditions are met, in order to
minimize the false positives in container violation errors.

Test: Run container enforcement and observe results
Bug: 354029496
Change-Id: I04b52c5662f635ab1837eb33a39f187ae8998238
2024-07-22 22:31:50 +00:00
Treehugger Robot
7f3f3002d6 Merge "Add jarjar_rename property to java modules." into main am: e69b3218f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3186139

Change-Id: Ia8d7068b8026dd26808242e80f51a969a0007b61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-22 14:20:42 +00:00
Joe Onorato
a5d171773d Add jarjar_rename property to java modules.
It's the same mechanism that aconfig uses, but now it's exposed directly
to Android.bp files.  (I had wanted to test it out there before making
it a property just in case it didn't work well)

Bug: 352385368
Test: go test -v -run TestJarJar.*
Change-Id: I72d797d08a250be93779ee4b038a1b8fc62123b7
2024-07-20 17:46:15 -07:00
Spandan Das
1680176498 Merge "Add all compile deps to module_bp_java_deps.json" into main am: ad2aa3d220
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3183819

Change-Id: I9e697860a14ba9e09f0bbb9031bab73f90bf0b29
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-19 16:40:28 +00:00
Spandan Das
8aac993b94 Add all compile deps to module_bp_java_deps.json
`Dependencies` in module_bp_java_deps.json currently only contains the
`libs` and `static_libs` of the corresponding module. This is only a
subset of the dependencies which are required to compile the java
module. Most notably, the SDK deps (determined using `sdk_version`) are
missing.

This CL adds all the compile dependencies to the json file. Implementation
details:
1. Add a `compileDepNames` to java.Module in base.go. Almost all the
   module types in java package are composed with the java.Module
struct.
2. Populate this property in java.Module.collectDeps. This function is
   used by java.Module.compile to determine the classpath used for
compilation.
3. Return `compileDepNames` in java.Module.CompilerDeps.

Since `compileDepNames` is populated in `GenerateAndroidBuildActions`,
update existing unit tests that check for correctness of IDEInfo.Deps

Bug: 353811607
Test: m nothing --no-skip-soong-tests
Test: cat out/soong/module_bp_java_deps.json | jq '."DebuggingRestrictionController".dependencies'
[
  "android_system_stubs_current", <-- missing previously
  "core-lambda-stubs", <-- missing previously
  "core-public-stubs-system-modules", <-- missing previously
  "com.google.android.material_material",
  ...
  ...
]

Change-Id: I166c0eaf6e87ca7adc98bb4e21447cf82612d103
2024-07-19 01:03:27 +00:00
Treehugger Robot
4cd1c3174b Merge "Populate java_api_libray's IDEInfo" into main am: bd3fd1daca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3183128

Change-Id: Ic60d6564d56d296ae3b82c400a69820da3e131b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-18 22:51:11 +00:00
Treehugger Robot
bd3fd1daca Merge "Populate java_api_libray's IDEInfo" into main 2024-07-18 22:29:17 +00:00
Spandan Das
4ae68018a0 Populate java_api_libray's IDEInfo
Adding the srcjar to module_bp_java_deps.json is useful for IDE
autocompletion of rdeps.

Bug: 353806911
Test: cat out/soong/module_bp_java_deps.json | jq '."core.current.stubs.from-text"'
{
  "dependencies": [
    "stub-annotations"
  ],
  "srcjars": [
    "out/soong/.intermediates/build/soong/java/core-libraries/core.current.stubs.from-text/android_common/metalava/core.current.stubs.from-text-stubs.srcjar"
  ],
  "path": [
    "build/soong/java/core-libraries"
  ],
  "libs": [
    "stub-annotations"
  ]
}

Change-Id: Ie4ad985a7da40b478453735dfdb10d0ac63ab8f4
2024-07-18 21:35:28 +00:00
Treehugger Robot
54848573e4 Merge "Support aapt2 resources flagging" into main am: 2484be669a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3177780

Change-Id: I9be8826cab35704598d79f37735a3b931e6d67d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-18 01:54:23 +00:00
Jihoon Kang
98ea83687f Support aapt2 resources flagging
This change modifies the aconfig and aapt2 build rules to support
resources flagging in aapt2.

Implementation details:
- Modify the aconfig text rule to include flag permission in the output
  text file
- Pass the `--flags-packages` argument to `aapt2 compile` command,
  similar to what is currently being done in the `aapt2 link` command

Bug: 344979955
Test: m nothing --no-skip-soong-tests
Change-Id: I3b0b1fd6dcd691b7cc50ba3d081ecafd82c2c904
2024-07-16 19:41:31 +00:00
Chaitanya Cheemala
b5c315a85d Merge "Revert^11 "Enable dex container (DEX v41) for the whole system"" into main am: e952680e35
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3175362

Change-Id: I4952b8b5926e02c7bcc7ded06bbb2130f2e544ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 13:13:19 +00:00
Chaitanya Cheemala
e952680e35 Merge "Revert^11 "Enable dex container (DEX v41) for the whole system"" into main 2024-07-16 12:41:17 +00:00
Chaitanya Cheemala
78fccd9380 Revert^11 "Enable dex container (DEX v41) for the whole system"
This reverts commit d4f7316224.

Reason for revert: Likely culprit for b/353452237, b/353451623  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I187b9787d0b3f39c1d67c0e5a16930bee2af951d
2024-07-16 11:47:47 +00:00
Ulya Trofimovich
9b61b34273 Merge "Revert^10 "Enable dex container (DEX v41) for the whole system"" into main am: acd022514c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3165136

Change-Id: I746fdbf4b650f518918eb0f33c6f28b2d69fd726
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 07:55:41 +00:00
Ulya Trofimovich
acd022514c Merge "Revert^10 "Enable dex container (DEX v41) for the whole system"" into main 2024-07-16 07:38:16 +00:00
Treehugger Robot
fd440d75e5 Merge changes I861a60e1,I01bf99fa,I9d16dfec into main am: 9678733731
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3150116

Change-Id: I3745d3347b71ef589a74366f449041b0391d64a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 01:06:07 +00:00
Treehugger Robot
9678733731 Merge changes I861a60e1,I01bf99fa,I9d16dfec into main
* changes:
  Add util method HasIntersection(...)
  Implement InstallableModule for Java modules
  Collect container informations
2024-07-16 00:43:04 +00:00
Jihoon Kang
f86fe9a876 Implement InstallableModule for Java modules
This change enables the container information to be collected for Java
modules.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I01bf99fa274275a608601ad6248d577ae8f6dffc
2024-07-15 23:46:01 +00:00
Colin Cross
4a6b31a65e Add IsAddingDependency to IncomingTransitionContext am: e1a8555581
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3141802

Change-Id: Ib8f5bfbb73b467e74063d15e8644aac8c6298276
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-12 00:22:31 +00:00
Colin Cross
e1a8555581 Add IsAddingDependency to IncomingTransitionContext
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency.  This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.

This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.

Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
2024-07-11 16:59:34 -07:00
Treehugger Robot
fdc5ce9cd6 Merge "Remove hidden_api_packages as it is no longer needed" into main am: 2f867fd9ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3165142

Change-Id: Id0fa3c9b9b06bf4e766c63fec8321f2a6fb46151
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 21:12:47 +00:00
Treehugger Robot
2f867fd9ac Merge "Remove hidden_api_packages as it is no longer needed" into main 2024-07-11 20:59:19 +00:00
mrziwang
0284657412 Fix typo in outputFilesForModule error message am: 68b2594524
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3167456

Change-Id: Iac1ee7ca6f85dbbbb4df7fafd71060ddeda1f589
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 19:14:26 +00:00
mrziwang
68b2594524 Fix typo in outputFilesForModule error message
Test: CI
Change-Id: I41f28a0412613458a0dad132006adfbc9fbbce2c
2024-07-11 09:58:30 -07:00
Paul Duffin
d2adde79aa Remove hidden_api_packages as it is no longer needed
The `--hide-package` option that this uses is being removed from
Metalava. The same functionality can more easily be achieved by simply
creating a `package.html` or preferably `package-info.java` that
contains `@hide` in their `<body>` tag or Javadoc respectively.

Bug: 351991463
Test: m checkapi
Change-Id: If7ea2449d1bddc0df460c285bf7959dbf9409b04
2024-07-11 14:08:19 +01:00
Ulya Trofimovich
df24b94ca9 Merge "Add property No_dex_container to dexProperies." into main am: 59514dc77c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3164217

Change-Id: Icc5c341e1d1e13e47284e1271f1aef83dbe1dac5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 09:22:10 +00:00
Ulya Trofimovich
59514dc77c Merge "Add property No_dex_container to dexProperies." into main 2024-07-11 08:48:54 +00:00
Ulya Trofimovich
d4f7316224 Revert^10 "Enable dex container (DEX v41) for the whole system"
This reverts commit 113654faca.

Reason for revert: Fixed CarLauncherTests error by providing an
    Android.bp property to disable multi-dex for a given app.

Bug: 341652226
Bug: 329907267

Test: atest CarLauncherTests -- --abi x86_64

Change-Id: Ie374161b38f0c260108b2b079ada6bdf4657aa86
2024-07-11 08:50:45 +01:00
Ulya Trafimovich
c8160584f3 Add property No_dex_container to dexProperies.
This is needed to allow individual apps disable dex container (also
known as "multi-dex") once it has been enabled globally. This property
does not translate to D8 options, it is used only in the build system.

Bug: 341652226
Bug: 329907267
Test: atest CarLauncherTests -- --abi x86_64
Change-Id: I3afda554af93dbb35bb2f4a8032ac0f5ed1df40d
2024-07-11 08:47:54 +01:00
Zi Wang
c86a0975fe Merge "Use OutputFilesProvider on java modules" into main am: 256772f02c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3165563

Change-Id: Iad4f22396b46ac797fbfab031764166c269742f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 01:52:40 +00:00
Zi Wang
256772f02c Merge "Use OutputFilesProvider on java modules" into main 2024-07-11 01:24:10 +00:00
mrziwang
9f7b9f4a9a Use OutputFilesProvider on java modules
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

Test: CI
Bug: 339477385
Change-Id: I3c9f0b766325dd490bc903dc65259c3953d34606
2024-07-10 12:18:06 -07:00
Treehugger Robot
dfe63386f4 Merge "Properly package JNI libs in Robo tests" into main am: 60cb3a6dce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3164496

Change-Id: Ib668df077779ac60d86ea73c8f065d65de721aed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-09 23:31:28 +00:00
Treehugger Robot
60cb3a6dce Merge "Properly package JNI libs in Robo tests" into main 2024-07-09 23:10:30 +00:00
Zi Wang
ba049bf44e Merge "Use OutputFilesProvider on Import, AARImport and AndroidAppImport" into main am: 8dfc2bf163
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3165036

Change-Id: Iec3854ddb3f61a502d5afaa605d667a9929beb4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-09 21:48:09 +00:00