Commit Graph

8392 Commits

Author SHA1 Message Date
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
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
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
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
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
2f867fd9ac Merge "Remove hidden_api_packages as it is no longer needed" into main 2024-07-11 20:59:19 +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
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
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
60cb3a6dce Merge "Properly package JNI libs in Robo tests" into main 2024-07-09 23:10:30 +00:00
Zi Wang
8dfc2bf163 Merge "Use OutputFilesProvider on Import, AARImport and AndroidAppImport" into main 2024-07-09 21:28:55 +00:00
mrziwang
39e68fff47 Use OutputFilesProvider on droidstubs
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: I8ea7463cfc3881d800255aa99147897eeba85b04
2024-07-09 10:57:54 -07:00
mrziwang
68786d81de Use OutputFilesProvider on Import, AARImport and AndroidAppImport
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: I51ccf59f97cb8a790642cb4463c479feaf18058a
2024-07-09 10:41:55 -07:00
Jamie Garside
56f2b7000c Properly package JNI libs in Robo tests
Previously, the jni_libs property was ignored when packaging
robolectric-tests.zip, meaning that tests sometimes couldn't find native
libraries. This change causes any native libs that tests use to be
written alongside the .jar/.apk for Robolectric tests.

99% of this code is just stolen from the Ravenwood tests, as they work
in this area. In short though, any native libs will be built for the
host arch and put in the correct place.

Tests are a little lacking (just testing the new functionality), but I'm
not 100% sure how to test the rest of the Robolectric file.

Bug: 340801983
Test: Manually verified, `go test` in java/
Change-Id: I4ef28b1cbc4675fc329dc8fcab06d055d6538e60
2024-07-09 11:04:29 +00:00
Alyssa Ketpreechasawat
40ca9c933b Merge "Add option to override defaultManifestVersion for app." into main 2024-07-09 09:33:48 +00:00
Alyssa Ketpreechasawat
ee8b44e72a Add option to override defaultManifestVersion for app.
Add an option to override defaultManifestVersion using environment
variable. With this environment variable, the mainline developer will be able to locally customize the app version to higher version and install it to target devices. This is also helpful as a workaround to adjust app/apex version for coverage build (e.g. 3520 to 3500) and allow the installation of app/apex from mainline release branch (e.g. 3508) onto it. This functionality already existed for apex, so we are extending to the app.

Test: 347735412
Bug: 350986287
Bug: 347735412
Test: OVERRIDE_APEX_MANIFEST_DEFAULT_VERSION=990090000 m
Test: adb shell pm list packages --show-versioncode
Change-Id: I58259fe781ca121ba4067f308f1744d80c1c2d48
2024-07-09 09:32:48 +00:00
Liana Kazanova
e680d1b381 Merge "Revert^3 "Make Lint FlaggedApi violations errors"" into main 2024-07-08 17:56:06 +00:00
ELIYAZ MOMIN
8609726c15 Revert^3 "Make Lint FlaggedApi violations errors"
This reverts commit 373024d012.

Reason for revert: <Potential culprit for b/351156674 and b/351161963 - 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: I54b011d88b521a81918574d174c208fab0047adb
2024-07-08 13:32:42 +00:00
Mårten Kongstad
95561d23b3 Merge "Revert^2 "Make Lint FlaggedApi violations errors"" into main 2024-07-04 13:02:19 +00:00
Mårten Kongstad
373024d012 Revert^2 "Make Lint FlaggedApi violations errors"
This reverts commit 38813efb53.

Reason for revert: all known Lint violations baselined.

Change-Id: Ic6bf778df563ef6a592427442a9cc6a3d9ef8b51
2024-07-04 11:39:55 +00:00
Priyanka Advani
58d4898b12 Merge "Revert "Make Lint FlaggedApi violations errors"" into main 2024-07-04 00:17:28 +00:00
Priyanka Advani
38813efb53 Revert "Make Lint FlaggedApi violations errors"
Revert submission 3156916-flagged-api-lint-baseline

Reason for revert: Droidmonitor created revert due to build breakages in b/350976857.

Reverted changes: /q/submissionid:3156916-flagged-api-lint-baseline

Change-Id: I625226c2d2a4b68094a6566d7a9459bd36d935c5
2024-07-03 19:53:55 +00:00
Treehugger Robot
013e72c8e5 Merge "Make Lint FlaggedApi violations errors" into main 2024-07-03 15:38:18 +00:00
mrziwang
aa2a2b6119 Use OutputFilesProvider on prebuilt_stubs_sources
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: I3468505c678f7af92d669d1a02d6f26b1c2e199d
2024-07-01 12:09:20 -07:00
Kevin Liu
00c2b86d62 Merge "Revert^2 "Set strict_mode to true"" into main 2024-06-28 18:33:35 +00:00
Zi Wang
6650b15953 Merge "Use OutputFilesProvider on platformBootclasspathModule" into main 2024-06-28 16:39:39 +00:00
Kevin Liu
51349b87e9 Revert^2 "Set strict_mode to true"
a475258298

Change-Id: I751aa55a873714a4344bf85a33ea26d30604bacb
2024-06-28 15:02:12 +00:00
Pechetty Sravani
3dcfc11ad9 Merge "Revert "Set strict_mode to true"" into main 2024-06-28 09:14:46 +00:00
Pechetty Sravani
a475258298 Revert "Set strict_mode to true"
Revert submission 3070929-strictMode+whiteList

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

Reverted changes: /q/submissionid:3070929-strictMode%252BwhiteList

Change-Id: I2df256e81a26de4b1f4c35da5194d5aba8ae0a43
2024-06-28 05:19:16 +00:00
Treehugger Robot
c8317181d0 Merge "Use metalava's signature-to-dex subcommand" into main 2024-06-28 04:17:14 +00:00
Kevin Liu
81362a73de Merge "Set strict_mode to true" into main 2024-06-28 02:13:02 +00:00
Paul Duffin
78ed7f3ab6 Use metalava's signature-to-dex subcommand
Use the new `signature-to-dex` subcommand rather than the deprecated
`--dex-api` option. The subcommand is already used elsewhere and uses
basically the same code under the covers as `--dex-api`.

Bug: 307737035
Test: TH
Change-Id: I649c5eccb332c6d0993c890714245040de37540e
2024-06-28 00:13:29 +01:00
mrziwang
444762b467 Use OutputFilesProvider on platformBootclasspathModule
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: I2a5317ae92a11df0a2cb9f803121d03e16859cb2
2024-06-27 14:23:52 -07:00
mrziwang
74e5021580 Use OutputFilesProvider on JavaDoc and Droiddoc
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: If3d501a0dde0f1f00508c4e4e73ce42918b7e610
2024-06-27 10:14:24 -07:00
Spandan Das
94df13d902 Merge "Enforce that tests in MTS specify a min_sdk_version" into main 2024-06-26 02:16:05 +00:00
Treehugger Robot
9c067f62d0 Merge "Remove the unused apiFileTag" into main 2024-06-26 00:10:52 +00:00
Jihoon Kang
00d405099c Merge "Modify extractStubsSourceInfoFromDep to respect RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag" into main 2024-06-25 23:00:00 +00:00
Spandan Das
b041087f58 Enforce that tests in MTS specify a min_sdk_version
Specifying min_sdk_version ensures backwards compatibility. There are
some existing violations, and those have been baseline'd using an
allowlist.

Bug: 156476221
Test: m nothing
Change-Id: I55098206da8ec5cfa0a9f5e7b41c9b8dedbdcbd2
2024-06-25 22:47:49 +00:00
Jihoon Kang
0ef9f7740a Remove the unused apiFileTag
This change removes the unused `apiScope.apiFileTag` and its
`depInfoExtractor` function.

Test: m nothing --no-skip-soong-tests
Change-Id: I640bee3a188be03742559e31ce4fbc4475dbd3ba
2024-06-25 22:47:35 +00:00
Jihoon Kang
2a26b1326b Modify extractStubsSourceInfoFromDep to respect RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag
Currently, extractStubsSourceInfoFromDep always return the "everything"
stub artifacts. This change modifies such behavior so that the
"exportable" artifacts are set when
`RELEASE_HIDDEN_API_EXPORTABLE_STUBS` build flag is set to true.

Test: m nothing --no-skip-soong-tests
Bug: 348370901

Change-Id: I1cf0ff7a63c8a580c3553a817ca303d6e8734a2a
2024-06-25 22:24:42 +00:00
Treehugger Robot
94a6824c99 Merge "Utilize linter artifacts of the impl library in the top level sdk library" into main 2024-06-25 22:18:51 +00:00
Jihoon Kang
629e2a3e9a Utilize linter artifacts of the impl library in the top level sdk library
When creating the lint reports for the mainline modules, the apex
build rule collects the lint artifacts from its dependencies. The
artifacts for Java modules are collected using the two methods:
- `JacocoReportClassesFile()`
- `LintDepSets()`

https://r.android.com/3079425 has removed the compilation actions from
the top level sdk library, but given that BCPF and SSCPF still list the
top level sdk library as the dependency, the lint artifacts are
collected from the top level sdk library. The aforementioned change
resolved this discrepancy by the top level sdk library referencing the
build artifacts of the implementation library.

However, `LintDepSet()` was mistakenly left out, leading to the lint
xml file of the sdk library not being correctly included in the apex
lint artifacts. This change fixes such discrepancy by the top level sdk
library correctly referencing the lint dep set output of the
implementation library.

Bug: 339267677
Test: TARGET_RELEASE=ap3a TARGET_BUILD_VARIANT=userdebug
PRODUCT=mainline_modules_x86_64 MODULE_RELEASED_PLATFORM=U
COVERAGE_MODULES="configinfrastructure"
./vendor/google/build/build_unbundled_coverage_mainline_module.sh \
inspect ninja command and verify that the lint xml files of the impl lib
is included in com.android.configinfrastructure module lint-report-xml.zip

Change-Id: I5c397c8782bad3bc21524f9ef7991cfdda4cdda1
2024-06-25 20:47:49 +00:00
Justin Yun
8a7978cb16 Call InstallFile to install files in soong built filesystem
platform_compat_config modules install files in `system/etc`, but the
files are missing from the soong-defined system image.
Calling InstallFile solves the problem.

Bug: 339133685
Test: m aosp_cf_system_x86_64
Change-Id: I46d5e75424a85108d0b478e4f0143f16ee26b53e
2024-06-25 09:40:30 +09:00
Spandan Das
79035fa842 Merge "Declare the implicit outputs for r8RE" into main 2024-06-24 20:18:16 +00:00