Commit Graph

8396 Commits

Author SHA1 Message Date
Jihoon Kang
472f73fdac Add API compatilibility flags to the exportable stubs
The API compatibility flags allow the APIs that have moved between API
surfaces to be correctly represented in the stub artifacts by passing
the previously released set of APIs and removed APIs. These information
should be passed to metalava when generating the exportable stubs, so
that the APIs that move between the API surfaces are not blocked in the
hiddenapi flags.

Test: patch to 24Q3-beta-release, lunch sdk-trunk_staging-eng && m sdk
dist and ensure that the expected methods are not blocked in the
hiddenapi flags
Bug: 330753520

Change-Id: I030b0a46b09f0cea026fedc879f10d4edfd38ac3
2024-03-28 23:38:02 +00:00
Ronald Braunstein
1a6e7c032a Add test_module_config_host
This pairs with `test_module_config` but also works on the base is a
`java_test_host` module.
e.g.

	test_module_config_host {
	     name: "CtsOsHostTestCases_DERIVED_2566",
	     base: "CtsOsHostTestCases",
	     test_suites: ["general-tests"],
	     include_filters: [ "android.os.cts.StaticSharedLibsHostTests" ],
	     exclude_annotations: [ "androidx.test.filters.FlakyTest","org.junit.Ignore" ],
	}

The new module is composed of the previous and shares much of the same
code.

With respect to build size,
	Without this change, if you build CtsAppSecurityHostTestCases, there
	will be several copies of the jar (and related apks) :
	 *) 1 in framework
	     out/host/linux-x86/framework/CtsAppSecurityHostTestCases.jar
	 *) 1 in testcases for the test
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
	 *) 1 per compatibility suite testcases
		out/host/linux-x86/mts-documentsui/android-mts-documentsui/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mediaprovider/android-mts-mediaprovider/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts/android-mts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/cts/android-cts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mainline-infra/android-mts-mainline-infra/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar

	A dervived test using CtsAppSecurityHostTestCases as base adds one more
	to its testcases dir:
	  *) derived testcase.
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases_presubmit_ExternalStorageApp/CtsAppSecurityHostTestCases.jar

Fixes: b/327280990
Test: m clean && m  CtsOsHostTestCases_DERIVED_2566# as above
Test: atest CtsOsHostTestCases_DERIVED_2566 --collect-tests-only
Test: migrated the 71 TestMapping instances to Android.bp and build them.
  Ran tests on some of them.
  Ran some original `test_module_config` tests derived from `android_test` as well

TODO: Add actions to validate the given filters are valid for the given
test apks/jars.

Change-Id: I115eedb6ff6ba8e72bb49e71867daf49d25ca0f1
2024-03-28 15:07:17 -07:00
Kiyoung Kim
9743bab964 Ensure java level inter partition dependency with VNDK deprecation.
Previously JAVA dependency over partition was checked only when device
VNDK version is not empty. This change updates logic to enforce inter
partition dependency despite of VNDK version based on VNDK deprecation.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7444ad612aa6c525e61cc5c2a89f5421ab4465b4
2024-03-28 06:50:11 +00:00
Treehugger Robot
33e928b8de Merge "Support transitive proguard specs in android_library_import" into main am: f875565c7f am: ffff071768
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016841

Change-Id: Ice530c2a27b8695cb87e0353d452ed06d7f570b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-28 04:31:39 +00:00
Treehugger Robot
6305784ed5 Merge "Reland "Migrate buildinfo.sh script into Soong"" into main am: b30c12ee2f am: 49e0ec065a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3015794

Change-Id: I1fdfa5cf1b461aa8c72708b5c2fd32a689a3e79a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-28 03:35:48 +00:00
Treehugger Robot
b30c12ee2f Merge "Reland "Migrate buildinfo.sh script into Soong"" into main 2024-03-28 02:59:51 +00:00
Colin Cross
93febfc0ae Merge "Disable use_resource_processor when producing a shared library" into main am: 96ae140989 am: 6c1c83463c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016529

Change-Id: I24be222ed6ba43ece0e9ee301556333aa72d9792
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-27 22:49:48 +00:00
Colin Cross
96ae140989 Merge "Disable use_resource_processor when producing a shared library" into main 2024-03-27 22:22:25 +00:00
Colin Cross
cde5534ccd Support transitive proguard specs in android_library_import
Add support for android_library_import to propagate the proguard specs
from its static dependencies.

Bug: 326265727
Test: TestExportedProguardFlagFiles
Change-Id: I174c1d7937a529958f8d240214b279062ef74868
2024-03-27 14:14:09 -07:00
Colin Cross
eee4ab12fa Disable use_resource_processor when producing a shared library
Passing --shared-lib to aapt2 causes it to add an extra
onResourcesLoaded method that rewrites resources IDs to include
the package ID determined at runtime.  ResourceProcessorBusyBox
has no equivalent functionality, so disable whenever --shared-lib
is found in aaptflags for now.

Fixes: 330646473
Bug: 331641946
Test: manual
Change-Id: Ibb0c2c7bf7a41ab294f5c84b4b6018cc8a63b0f4
2024-03-27 11:58:58 -07:00
Nikolay Elenkov
7ee98928ea Add secretkeeper-v1-java to platform APIs
Bug: 324321147
Test: Manual -- trigger factory reset, confirm ISecretKeeper.deleteAll()
is being called in Trusty logs.

Change-Id: If793f784bc1a8c621a721d15da9aeb1ef11e7334
2024-03-27 06:51:34 +00:00
Inseob Kim
8fa54dab08 Reland "Migrate buildinfo.sh script into Soong"
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

This fixes an error caused by an incorrect path to build thumbprint
file.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Id4fa830009538856c30825ff47268b11fa6cb5d6
2024-03-27 14:18:45 +09:00
Gina Ko
de2057ff52 Merge "Revert "Migrate buildinfo.sh script into Soong"" into main am: 58d9063b66 am: 39bdd9a1a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3015493

Change-Id: I73a8ded46e468f595749395d8b66155dda2b0faa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 23:21:38 +00:00
Gina Ko
465549b579 Revert "Migrate buildinfo.sh script into Soong"
Revert submission 3004875-buildinfo_prop_soong

Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869

Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong

Bug: 331462869
Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
2024-03-26 22:46:11 +00:00
Inseob Kim
54f325aef3 Merge "Migrate buildinfo.sh script into Soong" into main am: 2f42ae62ea am: 075e8c7593
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004875

Change-Id: I50b511322fb616fcae3d4963f6a09749ce15bf80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 16:29:19 +00:00
Inseob Kim
5baf2cbcb6 Migrate buildinfo.sh script into Soong
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Icaa7e1fdab2a8c169ac00949d3aaf6c8212a1872
2024-03-26 05:55:49 +00:00
Colin Cross
ba7ed90fc2 Merge changes from topic "revert-3010297-revert-3008874-OJOKRLYEZJ-YRWACROLKC" into main am: 9dcc3676a9 am: e02a3cff20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3008805

Change-Id: I38ca136c9da7b23ce4a171b8e79cfb96c333c2af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 00:53:53 +00:00
Colin Cross
7f976cecd0 Revert "Revert "Support transitive dependencies through android_..." am: 9055e21914 am: 9f67cd1ba9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3008804

Change-Id: I88a45eb7a54a44e694b9b84930d79284a1dfc461
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 00:53:48 +00:00
Colin Cross
9055e21914 Revert "Revert "Support transitive dependencies through android_..."
Revert submission 3010297-revert-3008874-OJOKRLYEZJ

Reverted changes: /q/submissionid:3010297-revert-3008874-OJOKRLYEZJ

Change-Id: I885a449ddc284052f9d4ec0c030d5fc61247b522
2024-03-23 04:43:41 +00:00
Colin Cross
dad2a361ef Revert^2 "Support static_libs for java_import modules"
c6c9c7354b

Change-Id: Id011aca133d7bb45023a63c0f53d84a4d694cc2f
2024-03-23 04:43:41 +00:00
Colin Cross
252571c940 Merge changes from topic "revert-3008874-OJOKRLYEZJ" into main am: 567b9d707b am: 487e73abc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3010298

Change-Id: Ifba850f3b544766b5d84406242d4b9798f560715
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-23 00:05:20 +00:00
Colin Cross
a611b3dec0 Revert "Support static_libs for java_import modules" am: c6c9c7354b am: 3fd7beb859
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3010297

Change-Id: Ib1af3605b433db0a606f1f7986e8c8e80f3661e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-23 00:05:05 +00:00
Colin Cross
dcc08abb2e Merge changes from topic "no_more_nodeps" into main am: 77be51bcab am: 05856e5b4f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3008874

Change-Id: I08cab90a5a3da918c8a2e7e66f3a2a9234443333
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 22:22:58 +00:00
Colin Cross
06b6e250f4 Support transitive dependencies through android_libary_import modules am: 8179496764 am: cf1ec413be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2993110

Change-Id: I5043d181d10ec876fb02483b0764d7b1c8d5d76c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 22:22:53 +00:00
Colin Cross
3fd7beb859 Revert "Support static_libs for java_import modules" am: c6c9c7354b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3010297

Change-Id: If74d1c2906d74e5dd1c95189c04197d9bc51912e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 18:46:01 +00:00
Colin Cross
567b9d707b Merge changes from topic "revert-3008874-OJOKRLYEZJ" into main
* changes:
  Revert "Support transitive dependencies through android_libary_i..."
  Revert "Support static_libs for java_import modules"
2024-03-22 18:25:30 +00:00
Colin Cross
c6c9c7354b Revert "Support static_libs for java_import modules"
Revert submission 3008874

Reason for revert: b/330903911
Reverted changes: /q/submissionid:3008874

Change-Id: I34cca9d021d9c806e28bb6a6a6da78efd61cde27
2024-03-22 18:17:00 +00:00
Colin Cross
44841aada3 Revert "Support transitive dependencies through android_libary_i..."
Revert submission 3008874

Reason for revert: b/330903911
Reverted changes: /q/submissionid:3008874

Change-Id: Ie056a7f90803ab2d8e39e07eddf6c9c68e41ff3d
2024-03-22 18:16:57 +00:00
Colin Cross
cf1ec413be Support transitive dependencies through android_libary_import modules am: 8179496764
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2993110

Change-Id: I87cba26c2c9e33893aa8580453ef70d3f6dae1c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 17:19:23 +00:00
Colin Cross
77be51bcab Merge changes from topic "no_more_nodeps" into main
* changes:
  Support static_libs for java_import modules
  Support transitive dependencies through android_libary_import modules
2024-03-22 16:55:47 +00:00
Thiébaud Weksteen
6e70e0ca25 Merge "Support multiple sources for prebuilt_etc" into main am: d3348dbaaa am: 127610b214
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3003676

Change-Id: Iba61477fd62fbaac95ac44166b76e5b93baeb86a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 23:53:08 +00:00
Thiébaud Weksteen
d3348dbaaa Merge "Support multiple sources for prebuilt_etc" into main 2024-03-21 23:14:48 +00:00
Colin Cross
a174d2e987 Support static_libs for java_import modules
Remove the need to wrap java_import modules with a java_library
just to include static dependencies.

Bug: 288358614
Test: TestJavaImport
Change-Id: I888aecc6c0efc696a397fc1dd5d0ef5fd644bebc
2024-03-21 15:36:01 -07:00
Treehugger Robot
5133af1b7c Merge "Add aconfig flag support for runtime_resource_overlay" into main am: 7f75245402 am: 22389f00c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005019

Change-Id: Idf0c01815bfe9ff51d28efe5dae31d1b364d3c15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 19:48:44 +00:00
Treehugger Robot
7f75245402 Merge "Add aconfig flag support for runtime_resource_overlay" into main 2024-03-21 19:03:24 +00:00
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
Jihoon Kang
f8a621c609 Merge "droidstubs depend on the combined last api filegroup modules" into main am: 5a87a9ac1c am: cc43b09384
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005018

Change-Id: Ie460873f74f441745ade3ab5b005c43a09bc7c9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 18:25:30 +00:00
Jihoon Kang
5a87a9ac1c Merge "droidstubs depend on the combined last api filegroup modules" into main 2024-03-21 17:34:00 +00:00
Rico Wind
62aeba6724 Merge "Add flag for optimized resource shrinking with R8" into main am: bd71657e91 am: d430eea043
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000943

Change-Id: Ifcaff7d70d8b316e6f8d30b02fb289b76a56eb54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 15:21:25 +00:00
Rico Wind
bd71657e91 Merge "Add flag for optimized resource shrinking with R8" into main 2024-03-21 14:45:13 +00:00
Rico Wind
a2fa263786 Add flag for optimized resource shrinking with R8
If the flag is set we will:
 - pass --optimized-resource-shrinking to the r8 invocation
 - use non final fields for the generated R classes
 - not pass the aapt2 generated proguard rules, R8 will do the tracing of xml files

Bug: 325905703
Test: This is simply passing the flag through to R8, this is off by default
Change-Id: Ib2043f3201578c3bcd39c1de9a524fd78f6d795c
2024-03-21 12:33:53 +01:00
Treehugger Robot
c42283844d Merge "Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType" into main am: b291690bc4 am: f2a9631f03
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005678

Change-Id: I6e1fa0e258bdcd76518f6c6c8f9e2836f2182bc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 03:26:01 +00:00
Treehugger Robot
b291690bc4 Merge "Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType" into main 2024-03-21 02:47:59 +00:00
Thiébaud Weksteen
00e8b31ee6 Support multiple sources for prebuilt_etc
Keep the Src attribute for compatibility. The new attribute (Srcs) is
mutually exclusive with Src.

Keep SourceFilePath and OutputFile for compatibility with other modules.
These can be removed in a follow up change.

Bug: 328313691
Test: presubmit
Test: m blueprint_tests
Test: prebuilts/build-tools/build-prebuilts.sh (on build-tools branch)
Change-Id: I5d5b2657715a7180a829c7ed0f501872d561b662
2024-03-21 11:30:15 +11:00
Colin Cross
8179496764 Support transitive dependencies through android_libary_import modules
Fix dependencies of android_library_import modules so that the -nodeps
modules created by pom2bp are no longer necessary.  Provide transitive
manifests (b/288358614), combine static dependencies into the output
jars, and propagate uses_libraries and optional_uses_libraries from
dependencies.

Bug: 288358614
Test: TestManifestMerger
Test: TestAndroidResourceProcessor
Change-Id: Ief45169d04217826fbb21ba283602b38ef0dd3f6
2024-03-20 16:09:14 -07:00
Jihoon Kang
9f442dc5d4 Add aconfig flag support for runtime_resource_overlay
This change adds the support that was added to android_app in
https://r.android.com/2854663 for runtime_resource_overlay modules.

Implementation details:
- Add flags_packages as dependencies of runtime_resouce_overlay modules
- Pass the collected aconfig intermediate cache files to the
  aconfigBuildActionOptions.

Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I3e20f18e58be689ca32852f7bf0b7ea16024856b
2024-03-20 22:18:17 +00:00
Spandan Das
159b264873 Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType
build/soong/sdk will use these tags to differentiate the sdk and non-sdk
contents of bootclasspath and systemserverclasspath fragments.

Test: go build ./java
Bug: 326246905

Change-Id: Ia8352c09fcbbca06988eb57153e5986801eb45a5
2024-03-20 21:41:49 +00:00
Jihoon Kang
748a24dd6e droidstubs depend on the combined last api filegroup modules
This change creates a "combined" filegroup module, which will contain
all api files of the subset api scopes in the followup change. In this
change, the "combined" filegroup is identical to the currently existing
last api filegroup module in that it only contains the api file /
removed api file of the specific api scope.

This change also passes the "combined" filegroup to the droidstubs
module generated from the sdk_library modules, but this currently does
not lead to any functional changes as the "combined" filegroup is
identical to the currently existing last api filegroup.

Test: m nothing --no-skip-soong-tests
Bug: 321827591
Change-Id: If73a7229f2f970f7e74cd010a8b4808dc9018344
2024-03-20 21:29:39 +00:00
Treehugger Robot
8fd5eb844f Merge "Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag" into main am: bd339315ca am: 4ce43d4d7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3008113

Change-Id: I286bf2f627f456c9e3b8a503790f5667f15078f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 12:21:31 +00:00
Treehugger Robot
bd339315ca Merge "Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag" into main 2024-03-20 11:33:11 +00:00