Commit Graph

8172 Commits

Author SHA1 Message Date
Jihoon Kang
f4b835ccd9 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main am: 033ffb9533 am: 1628b82c6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001319

Change-Id: I81e9d102c17bb5a1caf4400fc9d9513eb2be5c02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 18:03:02 +00:00
Spandan Das
5bcf17db15 Merge "Revert "Add the implicit deps of javacRE"" into main am: d5b05655bb am: 0c5dee6f99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3037722

Change-Id: Ifb4ee9667fd162cd4fbf2ab905b47026ccac2e88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 18:02:12 +00:00
Jihoon Kang
033ffb9533 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main 2024-04-11 17:37:58 +00:00
Spandan Das
d5b05655bb Merge "Revert "Add the implicit deps of javacRE"" into main 2024-04-11 16:53:12 +00:00
Anna Bauza
d0476e4652 Revert "Add the implicit deps of javacRE"
This reverts commit eaa475107d.

Reason for revert: This cl broke AOSP build, read more b/333846153

Change-Id: I5538a3c78617d7c2db98a11b60cb61269dcec8d3
2024-04-11 09:58:46 +00:00
Spandan Das
6936459dbb Merge "Add the implicit deps of javacRE" into main am: fc4d366e38 am: 0dce877166
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3034456

Change-Id: If2deccc7f2dd1f1e2a24a5f5cda50305d1806c97
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 20:31:53 +00:00
Spandan Das
fc4d366e38 Merge "Add the implicit deps of javacRE" into main 2024-04-10 20:20:43 +00:00
Spandan Das
eaa475107d Add the implicit deps of javacRE
This includes
1. the prebuilt javac binary
2. the input .java files
3. the jars that are placed on the classpath during javac

(2) is passed via ${out}.rsp. This rsp file gets populated with the
input java files

For (3), this CL creates a new intermediate file whose content is
comma separated jars available on the classpath (this is the format
expected by rewrapper). This file is then registered in RSPFiles of
javacRE command, so that it gets passed to the rewrapper cmd as
`--input_list_paths`

(rspfiles are necesary for modules like framework-minus-apex to avoid
exceeding cmd line limits)

Bug: 308687455
Test: m framework-minus-apex; # verified that the relevant files are
added as `--inputs` of javac

Change-Id: I2ab9277fc394eb00454ef503c78a9f3451e596ac
2024-04-10 00:37:31 +00:00
Cole Faust
6aaa55d11a Remove "exported" ninja variables am: 8982b1c49e am: 50b1f9bd53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3031205

Change-Id: Ib94fb0c07106eb2ae52e3f317c44656fddb9aab3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 20:07:31 +00:00
Cole Faust
8982b1c49e Remove "exported" ninja variables
There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.

Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
2024-04-09 09:42:37 -07:00
Nikolay Elenkov
c8170926f6 Merge "Add secretkeeper-v1-java to platform APIs" into main am: f28b5697b8 am: 196729ffda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3003166

Change-Id: I6ed203fab98537ae18c51c9def19434acdbf20db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 02:20:53 +00:00
Nikolay Elenkov
f28b5697b8 Merge "Add secretkeeper-v1-java to platform APIs" into main 2024-04-09 01:59:35 +00:00
Treehugger Robot
926580047b Merge "Return the header jar of the implementation library in SdkHeaderJars()" into main am: 133a6d9e6f am: f68bf7d95b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026823

Change-Id: I9943c80d7c530fa86ab8d2e81dfd64cb7ce5fdfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 04:13:51 +00:00
Treehugger Robot
133a6d9e6f Merge "Return the header jar of the implementation library in SdkHeaderJars()" into main 2024-04-05 03:23:34 +00:00
Jihoon Kang
8479dea802 Return the header jar of the implementation library in SdkHeaderJars()
As part of the process to remove the compilation action in the top level
java sdk library, this change modifies SdkHeaderJars(...) (i.e. the
"magic") to return the header jar of the implementation library instead
of the header jar of the top level java sdk library when the
implementation jar is returned from the "magic".

This change also removes `SdkImplementationJars()` from the
SdkLibraryDependency interface, as it is not currently used anywhere
else.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: Icc00af4b1485dc2b1b0981a3e56758d0306dea69
2024-04-05 00:37:37 +00:00
Jihoon Kang
ead7fd2ec4 Merge "Add API compatilibility flags to the exportable stubs" into main am: 32e1b930e9 am: 970a886318
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3018345

Change-Id: I1f4b8b9caf0f0f9916bf9fc720f5f75b9bf9a9ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-03 16:10:32 +00:00
Jihoon Kang
32e1b930e9 Merge "Add API compatilibility flags to the exportable stubs" into main 2024-04-03 15:34:43 +00:00
Treehugger Robot
b861dc6489 Merge "Strip relative paths from android_library_import output files" into main am: eabd1ef484 am: b6be0f2d91
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3023204

Change-Id: Ide5e5eb99072c8ee31373a9d6d63bd721c3eda93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-02 21:46:47 +00:00
Treehugger Robot
eabd1ef484 Merge "Strip relative paths from android_library_import output files" into main 2024-04-02 21:01:45 +00:00
Colin Cross
28ac2ffc80 Strip relative paths from android_library_import output files
androidx.annotation_annotation is used as a test data file, and
converting it from an android_library to an android_library_import
causes the relative path used in the test data path to change.
Clear the relative path in android_library_import the same way that
android_library and other java based modules do.

Also change the name of classes-combined.jar to the name of the
module so that the output file has the right name if there are no
static dependences that require running the merge_zips step.

Bug: 288358614
Test: TestAndroidLibraryOutputFileRel
Change-Id: I28210aa370a742d789102ff71db3685ca744878f
2024-04-02 12:21:34 -07:00
Zi Wang
ddb2ee512c 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:78ffdd47a658dec4bf79e63d11a5f0f3b94876a4)
Merged-In: I476d959af025c46d2ba6d3f48ea378a086666a33
Change-Id: I476d959af025c46d2ba6d3f48ea378a086666a33
2024-04-02 16:44:02 +00:00
Zi Wang
74ef029da4 Merge "Move jarjar repackage action before combine action" into main 2024-04-01 16:33:53 +00:00
Ronald Braunstein
a5ebfad436 Merge "Add test_module_config_host" into main am: c654ad162c am: 105e57aaff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004867

Change-Id: Ic271f84645a97b6d1bd66e3374b0417847fe631b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-29 22:51:23 +00:00
Ronald Braunstein
c654ad162c Merge "Add test_module_config_host" into main 2024-03-29 22:15:08 +00:00
Kiyoung Kim
34aaf87104 Merge "Ensure java level inter partition dependency with VNDK deprecation." into main am: b54c4b4a96 am: eaf1e016f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016326

Change-Id: I23bd6a6eba850360a520dac6c3b75be70d18d7fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-29 01:15:52 +00:00
Jihoon Kang
3921f0b356 Collect aconfig_declarations of the dependent java_aconfig_library modules
droidstubs module require aconfig_declarations modules to be specified
when the module depends on the java_aconfig_library module in order to
generate the "exportable" stubs. This adds burden to the droidstubs or
java_sdk_library module owners, as module should specify both the
java_aconfig_library and aconfig_declarations modules to genreate the
"exportable" stubs, although the necessary information from the
aconfig_declarations module can be provided from the
java_aconfig_library modules.

In order to resolve such burden, this change enables the intermediate
cache files from the associated aconfig_declarations module of a
java_aconfig_library module to be propagated to its reverse dependencies
without having the specify the aconfig_declarations modules in the
droidstubs or java_sdk_library modules definitions.

This does not mean that the intermediate cache files of every transitive
dependencies of the java_sdk_library or the droidstubs will be passed to
aconfig to retrieve the state of the aconfig flags.

Specifically, only the java_aconfig_library modules or the java_library
modules that have static dependency on java_aconfig_library modules that
are passed to droidstubs via `libs` or `srcs` (using
":module_name{.tag}" syntax) will provide the intermediate cache files
to generate the "exportable" stubs. For java_sdk_library, all modules
listed as `libs`, `static_libs`, `stub_only_libs`, and `apiScope.libs`
are passed as `libs` and all modules listed as `api_srcs` and `srcs` are
passed as `srcs` to the droidstubs modules dynamically generated in
java_sdk_library module per api scope, thus these properties will be
affected.

Note that the test is being added in the apex package. This is because
trying to register the codegen package build components in the java
package leads to circular dependency between the codegen and the java
package, as codegen package imports the java package.

Test: m nothing --no-skip-soong-tests
Bug: 329284345
Change-Id: I7953ab64776f6947808321ce8a3598154501bcfe
2024-03-29 01:11:32 +00:00
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