Commit graph

726 commits

Author SHA1 Message Date
Sam Chiu
a71b90cf81 Revert "Always embed jni libs and store uncompressed"
Revert submission 3075263

Reason for revert: verifying the test failure b/339332424

Reverted changes: /q/submissionid:3075263

Change-Id: I0e1a526893ee6c591eaefadcee4bbbf321dfc1df
2024-05-08 06:49:33 +00:00
Sam Chiu
4f63dc7904 Revert "Collect transitve deps of jni libs only for bundled apps"
Revert submission 3075263

Reason for revert: verifying the test failure b/339332424

Reverted changes: /q/submissionid:3075263

Change-Id: Id976cba1156b13433d86988eaf41926b7d438433
2024-05-08 06:49:33 +00:00
Jiyong Park
4bc5231f61 Collect transitve deps of jni libs only for bundled apps
We do this because otherwise we will be embedding platform libs in the
bundled apps bloating their size.

Bug: 330276359
Test: Build Galery2 and check if libc++.so is not included there.
Change-Id: Ie866b192e9816bcb71b7ca3d74331d14d85592a4
2024-05-05 10:49:22 +09:00
Jiyong Park
3eea67d8eb Always embed jni libs and store uncompressed
Previously, unlike unbundled apps, if a platform app depends on a native
library, it is not embedded in the app, but installed to <partition>/lib
and the app is instead provided with a symlink to the lib. This actualy
is a legacy from the original Android where native libraries couldn't be
executed while embedded in the apk. To be executed, the native libs had
to be extracted to a mutable storage, but that had a risk of breaking
the verified boot, so libs couldn't be embedded.

Since API level 23, execute-in-place of native libs has become
possible. But platform apps had to opt-in (use_embedded_native_libs:
true) for the feature for a reason that is unclear today. Perhaps, it
was to save disk space in case when multiple apps share the same native
library, but such cases are found to be very rare, or non-existing.

With this CL, two changes are introduced:

1. jni libs are always embededd for all apps (bundled or unbundled)

2. use_embedded_native_libs is deprecated unless the module type is
   android_test or android_test_helper_app. It is now a
   no-op property. It's left just to not break existing bp files.

This will make unbundled apps bigger, but given that unbundled apps
built using android platform build system are tests, the size increase
should be acceptible.

Bug: 330276359
Test: m
Change-Id: I7df993ea85bce1c0a7222000c403a974818c3362
2024-05-04 01:58:09 +09:00
Treehugger Robot
9a8255f48e Merge changes from topic "cherrypicker-L27000030003160683:N90900030051335582" into main
* changes:
  Propagate transitive missing optional_uses_libs.
  Refactor the contruction of the manifest check inputs.
2024-04-16 13:35:54 +00:00
Jiakai Zhang
369370818f Propagate transitive missing optional_uses_libs.
Bug: 331528424
Test: m --no-skip-soong-tests
Ignore-AOSP-First: Depends on internal changes. Will cherry-pick once merged.
Merged-In: Ied2821f11b6a5056ecf577e1e25765bc6dd212c0
Change-Id: Ied2821f11b6a5056ecf577e1e25765bc6dd212c0
2024-04-15 12:16:21 +00:00
Jiakai Zhang
f98da19a07 Refactor the contruction of the manifest check inputs.
This is a no-op change for a majority of cases.

Before this change, the contruction of the manifest check inputs is
confusing. It mutates uses_libs properties in place just for the
manifest check, by replacing module names with library names for
direct dependencies and merging library names from CLC for both direct
denpendencies and transitive denpendencies, and then constructs manifest
check inputs from those mutated uses_libs properties. This is
error-prone and leads to insistency: the goal is to check that the CLC
matches the manifest, but the inputs to the check don't reflect the CLC.

After this change, we no longer mutate uses_libs properties in place.
Instead, we maintain a separate list of missing denpendencies, and then
construct manifest check inputs directly from the CLC for all existing
libraries, no matter they are direct or transtive, and from the separate
list of missing libraries. This change makes the logic more
consistent and straightforward, and it also allows us to easily do the
next change, which is to propagate transtive missing denpendencies.

In fact, this change revealed several bugs around library optionality
and order in CLC construction, and fixed them.

Bug: 331528424
Test: m --no-skip-soong-tests
Ignore-AOSP-First: Depends on internal changes. Will cherry-pick once merged.
Merged-In: I0de82e76c47995b54aba9efd41538d950256a95f
Change-Id: I0de82e76c47995b54aba9efd41538d950256a95f
2024-04-15 11:15:41 +00:00
Ronald Braunstein
cdc66f4268 Add "test-only" flag for java modules
As part of aosp/3022586 where we added the idea of "test-only" modules
and top_level_test_targets, this CL implements that for java modules.

We let users set "test-only" on java_library, but not on other modules
where the module kind is implicitly test-only, like java_test.
The implementation, not the user decides it is test-only.
We also exclude it from java_defaults.

	% gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.test_only = true and teams.kind not like "%cc_%" group by teams.kind'
	+--------------------------+----------+
	|        teams.kind        | count(*) |
	+--------------------------+----------+
	| android_test             |     1382 |
	| android_test_helper_app  |     1680 |
	| java_fuzz                |        5 |
	| java_test                |      774 |
	| java_test_helper_library |       29 |
	+--------------------------+----------+

	 % gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.top_level_target = true and teams.kind not like "%cc_%" group by teams.kind'
	+--------------+----------+
	|  teams.kind  | count(*) |
	+--------------+----------+
	| android_test |     1382 |
	| java_fuzz    |        5 |
	| java_test    |      774 |
	+--------------+----------+

Test: m nothing --no-skip-soong-tests
Test: go test ./java
Test: m all_teams

Bug: b/327280661
Change-Id: I9c3ad947dc3d68d6427abada27449526d69daa6b
2024-04-12 11:42:10 -07:00
Cole Faust
7a51454f5b Make app.go not executable
Test: Presubmits
Change-Id: I983e58980cab2aa58797714c216851a1a7eb7f73
2024-04-11 14:13:20 -07:00
Ronald Braunstein
c654ad162c Merge "Add test_module_config_host" into main 2024-03-29 22:15:08 +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
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
5c0a491e0a Merge "Add aconfig flag support for android_library" into main 2024-03-20 01:23:50 +00:00
Treehugger Robot
064b145365 Merge "Change java stem attribute for both device and host" into main 2024-03-20 01:05:50 +00:00
Jihoon Kang
9049c2725a Add aconfig flag support for android_library
This change adds the support that was added to android_app in
https://r.android.com/2854663 for android_library modules.

Implementation details:
- Move `Flags_packages` to aaptProperties, so that it can be utilized
  for both android_app and android_library.
- Wrap `VisitDirectDeps` of aconfig_declarations to a function that
  takes a ModuleContext as an input, so that it can be utilized in the
  `GenerateAndroidBuildActions` of both android_app and android_library.

Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I8a755f5ca615c8a1651afcd2ec441fc9fbd82c61
2024-03-20 00:06:05 +00:00
yangbill
2af0b6edd7 Change java stem attribute for both device and host
Bug: 329762127
Test: cd build/soong/java ; go test -run TestJavaLibHostWithStem
Test: cd build/soong/java ; go test -run TestAppStem
Test: cd build/soong/java ; go test -run TestAndroidAppImport_ArchVariants
Test: cd build/soong/java ; go test -run TestOverrideAndroidAppStem
Test: cd build/soong/java ; go test -run TestOverrideAndroidApp
Test: cd build/soong/java ; go test -run TestPackageNameOverride

Change-Id: I8fbdc82116f9a0c68121fbbeb1ef4f78f2b6fea3
2024-03-19 09:11:59 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
This is a followup to aosp/2999198 and adds information about apps.

Each app will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional

Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
  build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
  `android_app_import`
- All app module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source app module types

Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json

Test: #modified trunk_staging.locally to select prebuilts of some
mainline apps. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately

Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-14 18:12:30 +00:00
Ronald Braunstein
eefca7373c Merge "Test_Module_Config soong implementation" into main 2024-03-06 04:08:23 +00:00
Ronald Braunstein
fce431652d Test_Module_Config soong implementation
New soong module type `TestModuleConfig`

This module type allows to write:
   test_module_config {
    name: "DerivedFrameworks1",
    base: "FrameworksServicesTests",
    include_filters: ["com.android.server.accessibility.FingerprintGestureDispatcherTest"],
  }

This goal is to put the test options (include_fitler in this case) in
Android.bp rather than TEST_MAPPING to be able to name a set of options
and to allow the CI to more precise about which part of a TestModule
might be failing.
In general, it is recommended to split up tests rather than use this
approach, but that isn't always feasible.

More details on project here:  https://docs.google.com/document/d/1MpA4BS6mTr-1D-K9MVmzdHkSufAvIkkM4gPEUglNodk/edit?tab=t.0
Migration plan here: https://docs.google.com/document/d/1x3w-BvKO3E-GbY8YOSBuzJC6-pkLkuhfjSyZ1hJQBYM/edit?tab=t.0

Some details of final output:

   * All the [data] files from Derived are the same as base.
   * The apk names is changed to be the Module name
   * The test options are added to .config file
   * test-file-name in the .config file (for base.apk) is changed to be
     new apk.
   * module-info.json is hand inspected between base and derived.
   * I added a .manifest file so future tools know what base is, if they
     need it.

We are working a mechanism to use a CAS so the zip of the testcases
won't explode. (however the trident disk image will get bigger)

% tree -ls out/target/product/shiba/testcases/DerivedFrameworks1 out/target/product/shiba/testcases/FrameworksServicesTests
[       4096]  out/target/product/shiba/testcases/DerivedFrameworks1
├── [       4096]  arm64
│   └── [   72346281]  DerivedFrameworks1.apk
├── [      20887]  BstatsTestApp.apk
├── [       4096]  data
│   └── [        851]  broken_shortcut.xml
├── [       3157]  DerivedFrameworks1.config
├── [      12695]  JobTestApp.apk
├── [       8599]  MediaButtonReceiverHolderTestHelperApp.apk
├── [      16791]  SimpleServiceTestApp1.apk
├── [      16791]  SimpleServiceTestApp2.apk
├── [      16791]  SimpleServiceTestApp3.apk
├── [    1017540]  SuspendTestApp.apk
└── [         36]  test_module_config.manifest

[       4096]  out/target/product/shiba/testcases/FrameworksServicesTests
├── [       4096]  arm64
│   └── [   72346281]  FrameworksServicesTests.apk
├── [      20887]  BstatsTestApp.apk
├── [       4096]  data
│   └── [        851]  broken_shortcut.xml
├── [       2866]  FrameworksServicesTests.config
├── [      12695]  JobTestApp.apk
├── [       8599]  MediaButtonReceiverHolderTestHelperApp.apk
├── [      16791]  SimpleServiceTestApp1.apk
├── [      16791]  SimpleServiceTestApp2.apk
├── [      16791]  SimpleServiceTestApp3.apk
└── [    1017540]  SuspendTestApp.apk

Fixes: 314148134
Test: atest DerivedFrameworks1 DerivedFrameworks2
Test: m blueprint_tests
Change-Id: Ib73a3404557e0bd583b065f0cf2fd55fba9ccdbe
2024-03-06 00:38:56 +00:00
Spandan Das
4bec95e2f6 Merge "Disable dexpreopt if optional_uses_libs does not have an impl" into main 2024-02-20 08:08:35 +00:00
Spandan Das
0727ba76b1 Disable dexpreopt if optional_uses_libs does not have an impl
At ToT, an optional_uses_libs is not added to the build time CLC if it
does not exist in the tree. One edge case here is
java_sdk_library_import, which might exist in the tree, but without an
implementation. This cause issues during analysis when we try to verify
the correctness of the build time CLC.

This CL disables dexpreopt if a dependency does not have an
implementation. To limit inadvertent side effects, this is restricted to
java_sdk_library(_import) module types. (more precisely, it is restricted
to java_sdk_library_import, since the source module type will always
have an impl)

Bug: 315802285
Test: Added a unit test
Test: m nothing
Test: printf debugging in internal main, verified that this CL does not
disable dexpreopt on any android app inadvertently

Change-Id: I173fc2f3ff654fe4091e9a43322164afd3222ee7
2024-02-16 18:00:27 +00:00
Inseob Kim
5b90d3a703 Fix characteristic rro for overridden packages
Overridden packages can have different package names. This change reads
output APKs to parse package name, instead of manifest xml.

Bug: 325011777
Test: boot and idmap2 dump
Change-Id: I748b9db8bd6282d7f3a1478cf94b21580c7683e7
2024-02-14 16:55:33 +09:00
Inseob Kim
10af6edc52 Skip passing "--product default" to aapt2
Because
1) it has no effect.
2) it will simplify build commands, which will minimize differences
   among targets using generate_product_characteristics_rro

Bug: 322932641
Test: TH
Change-Id: I16afae597038da7489989483f8c926916d207df5
2024-02-13 12:56:46 +09:00
Makoto Onuki
2ca8427124 [Ravenwood] Install transitive JNI libraries too
Ignore-AOSP-First: Will cherry-pick later.
Bug: 318393625
Bug: 323931246

Test: run-ravenwood-tests.sh
Test: (with local change) atest RavenwoodBivalentTest_device RavenwoodMockitoTest_device
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:55c035761c8b7b758d710ed5eeb9192525677057)
Merged-In: Ie0f6bbf1aa6252d415c53cfc19178f0986cc57f1

Change-Id: Ie0f6bbf1aa6252d415c53cfc19178f0986cc57f1
2024-02-09 16:45:43 -08:00
Treehugger Robot
5a48d4fe3d Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" into main 2024-01-26 21:55:59 +00:00
Treehugger Robot
99ed03f4fe Merge "Add build flag to enable ResourceProcessorBusyBox by default" into main 2024-01-26 19:07:25 +00:00
Spandan Das
e21a8d4dc6 Fix the args used to dexpreopt system server jars in prebuilt apexes
For prebuilts, java.dexpreopt gets called twice
1. in the context of the top-level prebuilt apex
2. in the context of the java_library shim

Only the artifacts of (1) get installed. The artifacts generated by 2)
are unused. However the args used to generate the artifacts of (1) are
incorrect. It uses moduleName(ctx) to do special-handling of apex system
server jars. This special-handling does not happen in (1), so although
dexpreopt artficats get generated, they get generated with the wrong
args.

To fix this, add an additional parameter in java.dexpreopt to pass the
libraryName explicitly.

Details
- Delete moduleName function. This was used to determine the java
  library name, which is no longer safe
- Add a libraryName parameter to java.dexpreopt
- Most module types will use j.Name() as libraryName
- prebuilt_apex and apex_set will iterate over its `contents` and use
  each element as libraryName when invoking java.dexpreopt

With the correct args passed from (1), we can drop j.dexpreopt from (2)
completely. Dropping (2) also breaks profile guided dexpreopt tests.
These currently operate on (2). They will be moved to (1) in the next CL
of this stack.

Test: presubmits
Test: lunch cf_x86_64_auto-trunk_staging-userdebug && m nothing (this
was a postsubmit failure with aosp/2923733)
Test: art_standalone_dexpreopt_tests on next https://android-build.corp.google.com/builds/abtd/run/L86000030001579256
Test: art-gtest on git_master-art-host https://android-build.corp.google.com/builds/abtd/run/L07800030001550262

Bug: 308790457
Bug: 322255144

Change-Id: I8eb604c82f1fa5289d3cd1a20084d56e4d7485e3
2024-01-26 18:06:41 +00:00
Colin Cross
8f1b033cf7 Add build flag to enable ResourceProcessorBusyBox by default
Setting the RELEASE_USE_RESOURCE_PROCESSOR_BY_DEFAULT build flag will
change the default for use_resource_processor from false to true.

Bug: 294256649
Test: builds
Change-Id: If643bf8db9e2e039200f63f4aac226ed5b44d9e0
2024-01-26 09:09:42 -08:00
Colin Cross
f5f4ad3db6 Convert coverageMutator to a TransitionMutator
Convert coverageMutator to a TransitionMutator as a step towards
variants-on-demand.

Bug: 319288033
Test: coverage_test.go
Test: treehugger coverage builds
Change-Id: Ic50c0040dea8b42c36b5d784221daa00b7b0d379
2024-01-24 10:17:10 -08:00
Spandan Das
59a4a2b8d2 Replace panic with ModuleErrorf
This is a followup cleanup for aosp/2876754 and replaces panic with
ctx.ModuleErrorf. The latter creates a more expressive build error.

Implementation details
- export moduleErrorf interface from build/soong/android. This minimal
  interface will be used as a parameter for `DexJarBuildPath`
- Add ModuleErrorf to the function signature of DexJarBuildPath. This
  parameter only gets used for Import and SdkLibraryImport structs.
  These two can have duplicate deapexer definitions, and ModuleErrorf
  will be used to report that error
- Create a minimal implementation of `ModuleErrorf` in tests of java and
  apex

Test: m nothing --no-skip-soong-tests
Change-Id: I0febec651f40c3f04deb957e64133c94b80fbd78
2024-01-09 22:53:52 +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
Colin Cross
313aa5475f Convert OtherModuleProvider to generic providers API
Convert all of the callers of OtherModuleProvider/OtherModuleHasProvider
to use the type-safe android.OtherModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: Id77f514d68761a262d9ea830a601dbed804bbbe5
2023-12-14 16:12:22 -08:00
Colin Cross
ff694a8c88 Convert Provider to generic providers API
Convert all of the callers of Provider/HasProvider to use the type-safe
android.ModuleProvider API.

Bug: 316410648
Test: builds

Change-Id: I73479de1625fa2865b6c73444cd477e50d56dc5a
2023-12-14 16:12:21 -08:00
Colin Cross
402130276c Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.

Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
2023-12-14 16:12:20 -08:00
Cole Faust
2b64af861a Allow compile_data on all java modules
art java_test modules need to specify compile_data, make it common
to all java modules.

Bug: 307824623
Test: m lint-check
Change-Id: I68640f14137f9cadaf0c454d3b5abc9e2d1d9b4b
2023-12-13 18:22:18 -08:00
Colin Cross
a72573a727 Merge "Remove ConvertWithBp2build implementations" into main 2023-12-11 23:12:53 +00:00
Treehugger Robot
b49f038231 Merge "Add compile_data for android apps" into main 2023-12-11 19:25:20 +00:00
Colin Cross
8ff105860d Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-12-08 13:51:05 -08:00
Cole Faust
df1efd7251 Add compile_data for android apps
Compile_data is a property on rust rules to declare extra files
that are used by the compiler. In rust's case this happens commonly
with `include_str!()`.

Other compilers like javac or aapt2 don't often reach out to other
files, so it's not as neccessary. But they will follow symlinks.
We're making a change to only include symlinks themselves in sbox
sandboxes, and the targets of the symlinks must be listed
explicitly. For this, we need compile_data to list the targets
of symlinks.

Bug: 307824623
Test: m out/soong/.intermediates/frameworks/base/tools/aapt2/integration-tests/SymlinkTest/AaptSymlinkTest/android_common/lint/lint-baseline.xml with the symlink change
Change-Id: I33eb9cbe4b6eb25e3f33ea0ac9dade88c3d4a624
2023-12-08 12:34:42 -08:00
Jihoon Kang
84b2589e6d Add aconfig flag support for android_app
This change adds an overrideable property flags_packages to android_app,
which is used to list the aconfig_declarations module names that the app
depends on. The build action of android_app is modified to pass all
flags text file provided by the aconfig_declarations to aapt2 link as
--feature-flags arguments.

Test: m nothing --no-skip-soong-tests
Bug: 306024510
Change-Id: I4924f88b9954950cc1936a472cd7ac70f41add5d
2023-12-07 23:01:26 +00:00
Colin Cross
312634eb0f Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk
Java libraries were writing lists of files that changed whenever
transitive dependencies changed to Android-${TARGET_PRODUCT}.mk, causing
Kati analysis to rerun whenever a dependency was changed in Soong.
In both cases, Make would immediately use the list to write a single
output file.  Write the files in Soong and pass the path to the file
to Make instead, which will both reduce the size of
Android-${TARGET_PRODUCT}.mk and skip Kati analysis more often.

Bug: 309006256
Test: m checkbuild
Change-Id: I5dff16c6fb7cca8c6da927b37c612c7b1d0954e6
2023-11-29 10:31:13 -08:00
Rico Wind
98e7fa8db1 Reapply "Use R8 for resource shrinking"
This reverts commit a9fd59a7f2.

We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)

This disables the usage of the resource shrinker cli from cmd-line tools

There are no changes in this cl compared to the original land, the fix
was done in R8 (to use the same compression for res folder entries as
in the original)

Bug: 308710394
Bug: 309078004
Test: Existing, validated that resource table on SystemUI was byte<>byte equal, validated uncompression

Merged-In: Ib8a6fb128084e994325b975c46a036cb41494654

Change-Id: Id45b170dd50f75bc87e21ad03b2d0679efb7adc2
2023-11-29 05:07:50 +00:00
Colin Cross
09ad3a6505 Change deps of ctx.Install* from Paths to InstallPaths
Installed files should only depend on other installed files, change
the deps arguments of the ctx.Install* methods from Paths to
InstallPaths.

Bug: 311428265
Test: builds
Change-Id: I1ebef60a943bdbe907744cc43aa985371ac56d32
Merged-In: I1ebef60a943bdbe907744cc43aa985371ac56d32
2023-11-17 19:06:43 -08:00
Inseob Kim
b5d713f2cb Merge "Add support for auto-generated characteristics RRO" into main 2023-11-17 05:02:28 +00:00
Inseob Kim
34dc4cd738 Add support for auto-generated characteristics RRO
Setting Generate_product_characteristics_rro will automatically generate
an RRO package which contains resources with
'product="{PRODUCT_CHARACTERISTICS}"'. The RRO package will be installed
to /product partition. The app will be compiled with '--product
default', making the app identical to all targets.

Motivation for this change is to minimize divergence of system.img.

Bug: 294799593
Test: boot and idmap2 dump
Change-Id: I1371f7410a1ecf337e1f73214b024af39aa6d57a
2023-11-17 11:15:32 +09:00
Aditya Choudhary
d97bf36469 Merge "Add proto for Test ownership metadata." into main 2023-11-15 10:30:50 +00:00
Aditya Choudhary
9b59352a82 Add proto for Test ownership metadata.
This Cl adds a new rule to Soong to generate test spec metadata. Also, this CL adds a provider in various test module to provide test spec related data to the Soong rule.
Will add providers and test code to other Module in the future changes.
Provider added for the following test modules in this change: android_robolectric_test, android_test, bootclasspath_fragment_test, java_test, java_test_host, python_test, python_test_host, sh_test,and sh_test_host.

Bug: 296873595

Change-Id: I5f89f72d5874bb7838ae357efdb8c6ca208e18a7
2023-11-15 09:08:02 +00:00
Jiakai Zhang
2398442ec0 Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage.
OnlyPreoptBootImageAndSystemServer was for making the eng build faster.
This change makes it even faster.

Bug: 309011617
Test: Presubmit
Change-Id: If9001e99593b57deafa7b56f0ca6b3d4d80f56d3
2023-11-09 16:50:58 +00:00
Michael Stokes
2e09e68e56 Merge "Revert "Use R8 for resource shrinking"" into main 2023-11-03 12:12:40 +00:00
Rico Wind
a9fd59a7f2 Revert "Use R8 for resource shrinking"
Revert submission 2816534-r8resourceshrinking

Reason for revert: b/309075997

Reverted changes: /q/submissionid:2816534-r8resourceshrinking

Change-Id: Ic173491eaf22967fbad14fbcc85f6ddb2cf54d23
2023-11-03 10:26:38 +00:00