Commit Graph

7221 Commits

Author SHA1 Message Date
Alix Espino
f98019df2f Merge "add manifest_values application id property to soong" into main am: a9ead6ef2b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769927

Change-Id: I523dc527ca60db260f3405352c27fc3bacb6a0b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-31 14:34:34 +00:00
Alix Espino
a9ead6ef2b Merge "add manifest_values application id property to soong" into main 2023-10-31 14:17:53 +00:00
Treehugger Robot
f3d826d09c Merge "Update transitive lib propagation" into main am: 3d9ba8ff90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808361

Change-Id: Id2bfd9d7a5387a354cf882a498c312204b0f5a28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-31 04:58:03 +00:00
Jared Duke
efb6d60210 Update transitive lib propagation
Only propagate transitive libs by way of library-like references. This
avoids inclusion of transitive deps from tools like lint modules that
are unncessary for R8.

This yields build speedups for a number of targets, including:
 * services.jar:            -22% (66s -> 51s)
 * telephony-common.jar:    -27% (29s -> 21s)
 * updatable-media.jar:     -41% (17s -> 10s)
 * framework-appsearch.jar: -46% (13s ->  7s)

Bug: 302383328
Bug: 307273642
Test: m
Change-Id: I60bb30e84dabe522ea9ac9333f00e739962ea91d
2023-10-27 22:48:13 +00:00
Anton Hansson
09f168dc07 Merge "Remove UnavailableSymbol from warnings to disable" into main am: 8e586ab8b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2805913

Change-Id: I1ad2f6f547b53ac3a077fdb7cdc85dc3fe55215b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-27 08:08:10 +00:00
Anton Hansson
a5fa3dc54d Merge "Remove HiddenTypeParameter from warnings to disable" into main am: aa5b2cd37b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2805914

Change-Id: Id58e27352eb993c4835b92ef283fa1e1f694c203
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-27 08:07:55 +00:00
Anton Hansson
8e586ab8b3 Merge "Remove UnavailableSymbol from warnings to disable" into main 2023-10-27 07:36:35 +00:00
Anton Hansson
f9a2bc0e4b Remove HiddenTypeParameter from warnings to disable
Bug: 306806877
Test: m checkapi
Change-Id: I68036ad7fc24cda8673379a218ecbb26aa48ad8f
2023-10-26 15:13:26 +00:00
Anton Hansson
70f74de4cb Remove UnavailableSymbol from warnings to disable
Bug: 306806877
Test: m checkapi
Change-Id: If8ad3cf37d84ec30c886a0e6d094ea451c4c3d75
2023-10-26 14:35:39 +00:00
Mythri Alle
cfb87f5968 Merge "Don't minimize debug information if module explicitly asks for it" into main am: 4efd3365cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2803327

Change-Id: I6095259a3e71f8e9b38b6abde2a77d4c02322208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-26 08:42:43 +00:00
Mythri Alle
4b9f618a76 Don't minimize debug information if module explicitly asks for it
In some configurations (for ex: go, auto) we minimize debug information
to reduce disk and memory usage. However some tests need the debug
information to work as expected. If a test explicitly requests for debug
information by passing "-g" to javac flags don't add "-g:source,lines"
to minimize debug information. Javac gives priority to -g:source,lines
and doesn't respect the order. So check if there is a -g flag before
adding flags to minimize debug information.

Test: atest CtsJvmtiRunTest1912HostTestCases android.jvmti.cts.JvmtiHostTest1912#testJvmti
Change-Id: I45e0f5fa9e79c16c2ff6e9413941a9a637753653
2023-10-25 16:50:41 +00:00
Anton Hansson
7c041f77c1 Merge "Created empty framework-location non-updatable module" into main am: 05eabd9c4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2727716

Change-Id: I0e10ed7d9d51d3968c517452631c528825ba10a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-24 12:59:38 +00:00
Anton Hansson
05eabd9c4d Merge "Created empty framework-location non-updatable module" into main 2023-10-24 12:43:36 +00:00
Anton Hansson
8270d67ad9 Merge "SdkTestCore for non-updatable modules" into main am: af1c929943
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2799773

Change-Id: Ib97c590701670ec8269942541285404f23aea4e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-24 10:28:33 +00:00
Anton Hansson
af1c929943 Merge "SdkTestCore for non-updatable modules" into main 2023-10-24 10:06:54 +00:00
Alan Viverette
f80899cd23 Handle Android.bp files in subdirectories of androidx am: ec26327735
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2800134

Change-Id: I746f4369e68226b86ca8d2bcb13149ef01371422
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-23 21:07:55 +00:00
Alix
96ea8845c5 add manifest_values application id property to soong
Bug:278905106
Test: go test ./java --run TestManifestValuesApplicationIdSetsPackageName
	and locally built a module and checked manifest pacakge_name
Change-Id: I5c8fd27c177b9e255dce197706f62580894008cb
2023-10-23 18:26:53 +00:00
Alan Viverette
ec26327735 Handle Android.bp files in subdirectories of androidx
Bug: 304263344
Test: m droid
Change-Id: I473d017ed3169137cc234f7fbd5f01d5ad889cb2
2023-10-23 13:25:13 -04:00
Mark White
9421c4ceb9 SdkTestCore for non-updatable modules
Provides SdkTestCore/test_core_current sdk_version for non-updatable
modules that have their test scope dependent on test apis from
framework-minus-apex.

Ignore-AOSP-First: Change in topic with internal-first projects
Bug: 289776578
Test: m checkapi | go test ./java

Merged-In: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
Change-Id: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
2023-10-23 15:25:55 +00:00
Anas Sulaiman
cb1af7d75b Merge "support toggling compare mode for rbe actions" into main am: f76b3267d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2796314

Change-Id: Idb625dae1a2b621b5a15a5d1a4e9872d123bf210
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-20 15:02:15 +00:00
Anas Sulaiman
f76b3267d5 Merge "support toggling compare mode for rbe actions" into main 2023-10-20 14:41:18 +00:00
Jihoon Kang
89c8d9012c Merge "Disable from-text stub build for coverage build" into main am: 04803d4767
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2789434

Change-Id: I326b3fc11d21ca9e5e3834810ad54dff92668f40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-19 20:00:51 +00:00
Jihoon Kang
04803d4767 Merge "Disable from-text stub build for coverage build" into main 2023-10-19 19:22:33 +00:00
Xin Li
709e5f5389 Merge "Merge 10952656" into aosp-main-future 2023-10-19 17:58:29 +00:00
Cole Faust
14c1ed8d7d Merge "gofmt soong" into main 2023-10-19 03:48:45 +00:00
Cole Faust
06ea531ab3 gofmt soong
Test: Presubmits
Change-Id: Ia76c35ba51685eca29df51738000eacd3f43ce20
2023-10-18 17:42:59 -07:00
Treehugger Robot
8e592ad109 Merge changes from topic "revert-2786699-import-sdk-version-none-WYNCDQGHTE" into main
* changes:
  Revert "Don't use java_library for java_import neverlink"
  Revert "Do not convert sdk_version: "none""
2023-10-18 23:38:27 +00:00
Treehugger Robot
eecf47b14c Merge "Shard Javac" into main 2023-10-18 22:20:39 +00:00
Liz Kammer
e11182283f Revert "Don't use java_library for java_import neverlink"
Revert submission 2786699-import-sdk-version-none

Reason for revert: b/306220520

Reverted changes: /q/submissionid:2786699-import-sdk-version-none

Change-Id: I4fbe5fa54dc11fac898a7f15704833f01b9fa269
2023-10-18 20:38:37 +00:00
Liz Kammer
05f487a4cd Revert "Do not convert sdk_version: "none""
Revert submission 2786699-import-sdk-version-none

Reason for revert: b/306220520

Reverted changes: /q/submissionid:2786699-import-sdk-version-none

Change-Id: I309e269db70d9fedaf010ef44791516392fcb4ea
2023-10-18 20:38:37 +00:00
Anas Sulaiman
9c4936405e support toggling compare mode for rbe actions
This allows me to set metalava actions to run remotely (already toggleable) with local comparison (this CL).

Change-Id: I66b006d5ee11b3192ef81a2e5cefc07e9f3d10a2
2023-10-18 19:37:24 +00:00
Colin Cross
c292fa1797 Merge "Export resource processor R.jar files to ASfP" into main 2023-10-18 18:24:48 +00:00
usta
15ab550d04 Shard Javac
Test: m nothing
Test: allowlist frameworks/opt/calendar to bp2build convert
Test: add `javac_shard_size: 2` to calendar-common
Test: b //frameworks/opt/calendar:calendar-common
Bug: 297356812
Change-Id: Ie22bcf04946f3945952a74a46772b777b1522b70
2023-10-18 13:25:55 -04:00
Treehugger Robot
a815d9bf79 Merge changes from topic "import-sdk-version-none" into main
* changes:
  Do not convert sdk_version: "none"
  Don't use java_library for java_import neverlink
2023-10-18 17:17:59 +00:00
Liz Kammer
a855f73f4a Merge changes Iceb0b68f,I04865414 into main
* changes:
  Improve error message readability
  Share constants for droidstubs btw Soong & Bazel
2023-10-18 14:19:30 +00:00
Colin Cross
95b53b83eb Export resource processor R.jar files to ASfP
Export the R.jar files generated by ResourceProcessorBusyBox to
module_bp_java_deps.json for use by Android Studio for Platform.

Bug: 305997998
Test: examine module_bp_java_deps.json
Change-Id: I48e3e28b45219646765de7848ec9dbe77d14c662
2023-10-17 13:21:02 -07:00
Jihoon Kang
1975d3e326 Disable from-text stub build for coverage build
Coverage builds depend on `native` properties for API elements, which
are not included in the API signature files and consequently in
from-text stubs. As no robust solution for handling this has been
planned out at the moment, from-text stub build is disabled for
coverage builds.

Per go/android-code-coverage-quickstart , Java code coverage is
enabled by the three environment variables: `EMMA_INSTRUMENT`,
`EMMA_INSTRUMENT_STAIC` and `EMMA_INSTRUMENT_FRAMEWORK`. This change
disables from-text stub build if any of the three variables are set
to true.

Test: go test ./java && m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing --build-from-text-stub and inspect ninja query to verify that the stub java library module depends on the from-source stub module
Bug: 304271961
Change-Id: Ie485c784145de6c253611e698354c4f9e4a30685
2023-10-17 20:00:12 +00:00
Xin Li
b38b15ca24 Merge 10952656
Merged-In: I9bc9ea2b2760af5b57dd69463658bff3b8e74d9d
Change-Id: Ib253282aaf5fc14e6ea114bcd625c4cc7ebfbc9d
2023-10-17 10:05:50 -07:00
Treehugger Robot
2b808d0f22 Merge "Fix typo in droidstubs" into main 2023-10-17 15:39:40 +00:00
Liz Kammer
5dfe4be626 Do not convert sdk_version: "none"
These also require system_modules to be set. Wait until we convert
system_modules to convert sdk_version: "none"

Test: CI
Change-Id: I5bbdcb6819709a7c5a7932cb860a0de945f3528e
2023-10-17 09:10:13 -04:00
Liz Kammer
4e00b0929b Don't use java_library for java_import neverlink
Restricting use of sdk_version = "none" to only the rule types that will
correctly handled sdk_version = "none" by also handling system_module
attr

Test: CI && go tests
Change-Id: Ifa1c60ba8f5e3fcb28986cc84cdfaedcbd2d2957
2023-10-17 09:10:13 -04:00
Liz Kammer
e09e20ec47 Share constants for droidstubs btw Soong & Bazel
Test: m bp2build && verify constants
Change-Id: I04865414fb627672821b10d8bcc736379dc3da86
2023-10-17 09:10:08 -04:00
Treehugger Robot
c82e844121 Merge "Add assets property for Android apps." into main 2023-10-16 21:01:44 +00:00
Liz Kammer
170dd7239a Fix typo in droidstubs
Test: n/a
Change-Id: Idd58be843d01db008f1815f83149033bf5ac766d
2023-10-16 15:34:24 -04:00
Jiakai Zhang
ba82e28d5d Add assets property for Android apps.
This property is similar to `asset_dirs`, but for individual files. This
is especially useful when the user wants to pack generated asset files
into the APK.

Bug: 257532944
Test: m nothing
Change-Id: If3062124e9dedb41315dcaf5d379803e5419b8cd
2023-10-16 18:53:30 +01:00
Jihoon Kang
bc98b4151d Merge changes from topic "stub_validation" into main
* changes:
  Add current api check as validation for from-text stub generation
  Disable full_api_surface_stubs for some java_api_library modules
2023-10-16 16:34:41 +00:00
Colin Cross
e88d5b1796 Merge "Put shared library R.jar files in the classpath" into main am: 149f6f6f78 am: a43251d771
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2787024

Change-Id: I65bda887d0343e4501bc09a66f1d9fb523130ba2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-13 19:14:24 +00:00
Jihoon Kang
063ec003f9 Add current api check as validation for from-text stub generation
Currently, there is no build action ensuring that the API text files are
up to date, unless a user runs `m checkapi` or `m update-api`. This
means that the user must run `m update-api` after making a change that
modifies api surface(s), so that the API text file reflects the local
change. This adds additional layer of action to developers, and it is
not guaranteed that the developer will always run `m update-api` after
making an api surface-affecting changes.

To prevent such mistake, this change adds droidstub-level api check as
validation for from-text stub generation. With this change, the build
will fail if the API text file is not up to date and the user must run
`m update-api` when making api surface-affecting local changes.

The validation is done by adding all droidstubs modules associated with
the java_api_contributions passed to java_api_library via
`api_contributions` as dependency and setting the current api timestamp
files as the validations for the from-text stubs generating build rule.

The full api surface libraries will not run the validations to avoid
circular dependency. However, all java_sdk_library generated
java_api_library modules will run validations, mapped to the droidstubs
in the same api domaion.

If the user sets the environment variable `DISABLE_STUB_VALIDATION=true`, validation
actions are not run. Validation actions run by default.

Test: m nothing --build-from-text-stub and run ninja query to verify `check_current_api.timestamp`s are listed as validation \
      DISABLE_STUB_VALIDATION=true m nothing --build-from-text-stub and run ninja query to verify that validation actions are not added
Bug: 288624417
Change-Id: I329e6438fe8f3ac30d8c6a971d57853ed6b0d150
2023-10-13 18:24:41 +00:00
Colin Cross
149f6f6f78 Merge "Put shared library R.jar files in the classpath" into main 2023-10-13 18:08:04 +00:00
Jihoon Kang
d30ac8a32a Disable full_api_surface_stubs for some java_api_library modules
java_api_library modules generated from java_sdk_library get
full_api_surface_stubs corresponding to the api surface that the module
contributes to. However, modules generated from java_sdk_library where
sdk_version is none should not depend on the full api surface stub jar.

Test: m --build-from-text-stub
Bug: 288624417
Change-Id: I7edda3e6a40f739e805e8719b8d366da765a6933
2023-10-12 23:05:27 +00:00