Commit graph

6043 commits

Author SHA1 Message Date
Chris Parsons
44215bc31d Skip certain problematic deps
These are hacks to unblock allowlist v2. See attached bugs.

Bug: 303307672
Bug: 303310285
Test: Manually tested to unblock `m nothing` with allowlist v2 on AOSP
Change-Id: I076a96134118106b44e105db98617ffb9f33bca5
2023-10-05 17:54:34 +00:00
Christopher Parsons
29c559b785 Merge "create, but dont register, bp2build_deps mutator" into main 2023-10-04 21:38:49 +00:00
Treehugger Robot
e88fe1fb92 Merge "Expand regex for likely aidl filegroups" into main 2023-10-04 21:11:18 +00:00
Justin Yun
ce12ea8f95 Merge "Generate product variants by default" into main 2023-10-04 06:29:31 +00:00
Yu Liu
b57dd3946e Remove AconfigJavaHostTest from the allowlist.
It was added by an accident previously.

Bug: None
Test: CI
Change-Id: I9a1fa32bb2686f336f9735a1e809a8491d38cd4c
2023-10-03 11:22:07 -07:00
Jihoon Kang
a7e5e29ec1 Merge changes from topic "expose_flagged_api_revert" into main
* changes:
  Revert^2 "Add flagged api hide conditional to droidstubs"
  Revert^2 "Add soong config variable Release_expose_flagged_api"
2023-10-03 17:55:16 +00:00
Spandan Das
29af2a470d Merge "Handle symlinks in isPackageBoundary" into main 2023-10-03 17:51:41 +00:00
Yu Liu
7a90fcfa45 Merge "Convert java_aconfig_library to bazel." into main 2023-10-03 17:29:26 +00:00
Zi Wang
33befd0c58 Merge "Allowlist tradefed-common-util and some dependents for tradefed" into main 2023-10-03 16:31:29 +00:00
Jihoon Kang
c831389625 Revert^2 "Add flagged api hide conditional to droidstubs"
This reverts commit 1180919dda.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included && m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_food nothing and inspect ninja command for generating stubs and verify the flag is not included
Bug: 299570421
Change-Id: I4967376c0236bad729398af80fa59b48dbab5f21
2023-10-03 01:04:00 +00:00
Jihoon Kang
f3aa3225b6 Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 5548bf3053.

Test: m nothing
Bug: 299570421
Change-Id: I9f70648fb6657bbf4f5681cd6d40517d70a8fefb
2023-10-03 01:00:42 +00:00
Chris Parsons
5f1b3c7ad8 create, but dont register, bp2build_deps mutator
This is the bulk of the "allowlist v2" feature. It will disable bp2build
generation for modules which have transitive dependencies without a
bazel build definition.

This CL includes this mutator, but doesn't register it as a bp2build
mutator (outside of a few unit tests). This allows us to easily iterate
on completion of this feature and ensure there are no launch blockers
before we finalize the change in AOSP.

Bug: 285631638
Test: Unit tests
Change-Id: Ifb0a079c409ca19b02cafa3fab2efa0d3deebc50
2023-10-03 00:16:30 +00:00
Yu Liu
f2b94010c8 Convert java_aconfig_library to bazel.
Bug: 297357579
Test: Unit test and AconfigJavaHostTest
Change-Id: Icf944cc0b2a7382107923d49b2d2ff0eb4113638
2023-10-02 15:04:19 -07:00
Christopher Parsons
aa3e435857 Merge "Treat src=name filegroups as handcrafted targets" into main 2023-10-02 17:35:44 +00:00
Zi Wang
2260933688 Allowlist tradefed-common-util and some dependents for tradefed
Test: CI

Bug: 283193845
Change-Id: Id9e8eefcf47080e786c62466658c7cb1f31b055d
2023-10-02 09:56:34 -07:00
Romain Jobredeaux
e2007bfd0e Merge "Use manual BUILD files in jdk8 and allowlist apache-commons-compress" into main 2023-10-02 13:38:50 +00:00
Spandan Das
dc7d7f7557 Handle symlinks in isPackageBoundary
isPackageBoundary looks at ShouldKeepExistingFile before checking if
that directory contains a BUILD file or not. ShouldKeepExistingFile
should be complemented with a isSymlink check. This is necessary because
we copy all symlinks to the synthetic workspace, and the resolved
symlink might point to a directory containing a BUILD file.

This additional clause is redundant if the directory has been
allowlisted for keepExistingBuildFile (e.g. build/bazel, recursive)

Test: b build //bionic/libc:versioner-dependencies (top of stack)

Change-Id: I5b23262f89ea34a78de4ccade6d27e4c5dd95c2e
2023-09-29 21:04:30 +00:00
Romain Jobredeaux
3fe1edde31 Use manual BUILD files in jdk8 and allowlist apache-commons-compress
Bug: 302008402
Bug: 302587886
Change-Id: I91401bf3fcda4c83ad2bb9d782b4021ffe6fd103
2023-09-29 15:08:55 -04:00
Liz Kammer
79ff08f12c Expand regex for likely aidl filegroups
Test: go test soong tests
Change-Id: Iab7abea8e2d11583cb4a8ecd4b27368f61dd40e0
2023-09-29 12:38:42 -04:00
Mark White
477a31271d Merge "Added new framework-pdf jar inside MediaProvider module" into main 2023-09-29 12:21:33 +00:00
Chris Parsons
2ef472be7a Treat src=name filegroups as handcrafted targets
This is groundwork for allowlist v2, as such targets are still
effectively referencable via their file syntax; thus, rdep targets of
these filegroups should still be treated as convertible.

Fixes: 302025822
Test: Unit test update
Change-Id: I93445ff75e7c0570530725d086e47c1532833c06
2023-09-28 23:07:00 +00:00
Christopher Parsons
dec9ce6693 Merge "support aidl bp2build changes" into main 2023-09-28 20:19:43 +00:00
Cole Faust
6ed1e0fd59 Merge "AVB and selinux support in partitions" into main 2023-09-28 16:38:28 +00:00
Jingwen Chen
6b73be150c Merge "Allowlist directories for tradefed's deps." into main 2023-09-28 06:51:29 +00:00
Maxim Siniavine
4aa82a13db Merge changes from topic "revert-2755310-HIIDCMFNIU" into main
* changes:
  Revert "Add soong config variable Release_expose_flagged_api"
  Revert "Add flagged api hide conditional to droidstubs"
2023-09-28 01:08:44 +00:00
Maxim Siniavine
5548bf3053 Revert "Add soong config variable Release_expose_flagged_api"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: Ib5c01033882500296989a7c4476a723d95292aab
2023-09-28 01:01:59 +00:00
Maxim Siniavine
1180919dda Revert "Add flagged api hide conditional to droidstubs"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: I56306fc3b7e5608d21dbefe18d6a886561599f40
2023-09-28 01:01:59 +00:00
Chris Parsons
2173b5f578 support aidl bp2build changes
- Allowlist an aidl module by package, not name (to support a small
  module name change)
- Implement some unit test framework changes which facilitate better
  aidl bp2build testing
- Support a convenience function to add a load hook for registering a
  module as "has a bazel definition of a given target name"

Bug: 301676937
Test: m bp2build, verified the aidl target was generated before/after
this CL.
Test: Presubmits
Test: Ran bp2build progress and ensured that aidl_interface targets
under frameworks/ continued to appear converted

Change-Id: I62412057d6f61a2ce2bc39488c75af793eb14c94
2023-09-27 21:30:19 +00:00
Cole Faust
b5055394a9 AVB and selinux support in partitions
Bug: 297269187
Test: m bazel_sandwich (updated partition_inspector to show selinux contexts, but still haven't figured out how to show avb information)
Change-Id: I6911c2fc75495f9722887925d8609c9a171901c6
2023-09-27 14:14:14 -07:00
Romain Jobredeaux
641b62b205 Merge changes from topic "bazel_framework_res" into main
* changes:
  bp2build support for framework-res
  Keep rules_testing BUILD files
2023-09-27 20:52:50 +00:00
Treehugger Robot
1eeda315c8 Merge "Add frameworks/base/mime to allowlist" into main 2023-09-27 18:52:42 +00:00
Jihoon Kang
af26c102b8 Merge changes from topic "expose_flagged_api" into main
* changes:
  Add flagged api hide conditional to droidstubs
  Add soong config variable Release_expose_flagged_api
2023-09-27 17:09:27 +00:00
Jingwen Chen
7501a1b15b Allowlist directories for tradefed's deps.
Fix: 302094734
Test: presubmits/bp2build-incremental
Test: b build //tools/tradefederation/core/util_apps/... --config=android
Change-Id: I3d35650a1001defb74eb93a62b361109a5baccd9
2023-09-27 13:10:45 +00:00
Sam Delmerico
ec59517f6a Merge changes from topic "reland-rust-sbox-1" into main
* changes:
  Revert^2 "conditionally escape rule builder command"
  Revert^4 "allow Ninja variables in RuleBuilder API"
  Revert^4 "add crate_root property to rust modules"
  Revert^4 "add rust_toolchain_rustc_prebuilt module type"
2023-09-27 08:10:26 +00:00
Justin Yun
af1fde43f9 Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we
can generate product variants without checking the
PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the
PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product
variants by default.

Bug: 302255959
Test: m
Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
2023-09-27 16:36:40 +09:00
Treehugger Robot
c5b9abba30 Merge "Allowlist libflagtest and FlagMacrosTests." into main 2023-09-27 00:18:46 +00:00
Jihoon Kang
d91a8e806a Add flagged api hide conditional to droidstubs
APIs annotated with @FlaggedApi should not be included in the artifact
when building sdk target products in the "next" release configuration.

This change adds such logic by passing additional flag to metalava in
droidstubs.

The flag does not need to be passed to metalava invocation done in
java_api_library, as java_api_library generates stubs using api
signature files (i.e. *-current.txt files), and they will not contain
apis marked @FlaggedApi. The metalava invocation in droidstubs is
responsible for removing such apis.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included
Bug: 299570421
Change-Id: Ia4b699b6e3ff6324f050eecc9ff5b622fdc04621
2023-09-26 22:46:05 +00:00
Jihoon Kang
03f1aa064a Add soong config variable Release_expose_flagged_api
The variable is a release config variable which will be used to
determine whether if the api marked @FlaggedApi is exposed or not.

Test: m nothing
Bug: 299570421
Change-Id: I5647608065543cf5059836f6d6e8906a23145541
2023-09-26 22:32:50 +00:00
Liz Kammer
06d442e954 Add frameworks/base/mime to allowlist
Test: b build //frameworks/base/mime/...
Test: b build //frameworks/base/mime/... --config=android
Change-Id: If73e04e33487bbb63e14475b34f34b31b1386f16
2023-09-26 22:22:58 +00:00
Zi Wang
ffb9a2af93 Merge "Allowlist part of tradefed deps" into main 2023-09-26 22:20:02 +00:00
Romain Jobredeaux
9c06ef353b bp2build support for framework-res
Change-Id: I5b32a702e02b5f1ec08d5608d766a8a0c08d845c
Bug: 276928228
Bug: 297356405
2023-09-26 15:06:50 -04:00
Romain Jobredeaux
c9e585eabf Keep rules_testing BUILD files
Change-Id: I9036ac0c372f1935e29477bdd1a42203f65e5385
2023-09-26 15:04:13 -04:00
Jihoon Kang
e4bb4d4e6b Merge "Import make variable NextReleaseHideFlaggedApi to Soong" into main 2023-09-26 17:49:25 +00:00
Treehugger Robot
7c02986d60 Merge "Add system/tools/hidl to allowlist" into main 2023-09-26 16:59:03 +00:00
Zi Wang
aa516c562e Allowlist part of tradefed deps
Test: CI

Bug: 283193845
Change-Id: Idab167cc1698f40a3853967f31533bdfb6fbd455
2023-09-26 09:39:57 -07:00
Jingwen Chen
c6f3c10615 Allowlist system/core/libstats/expresslog
Fixes: 302046711
Test: b build //system/core/libstats/expresslog:libexpresslog --config=android
Change-Id: I904fa0e6bd31d454ec38be91dbeecb765593266c
2023-09-26 02:02:08 +00:00
Jihoon Kang
cfbc4077b3 Import make variable NextReleaseHideFlaggedApi to Soong
This change imports NextReleaseHideFlaggedApi exported from soong_config

Test: m nothing
Bug: 299570421
Change-Id: I410596a39d2ba9ad353c5cf48bd38b1e843633b2
2023-09-25 20:54:46 +00:00
Cole Faust
71aa535721 Merge "Emit a system image target for the current product" into main 2023-09-25 17:08:34 +00:00
Jingwen Chen
b70c096a65 Allowlist libflagtest and FlagMacrosTests.
Test: atest-dev FlagMacrosTest --roboleaf-mode=dev
Fixes: 300335177
Change-Id: I44a63b0a1aa6bef30736f72d01d7a80930e2f48d
2023-09-25 14:58:54 +00:00
Sam Delmerico
d46f6c81de Revert^2 "conditionally escape rule builder command"
53ed08aec0

Change-Id: Ic6e754bb270dbd3fa67ec31b5cbc1c5ef77d3238
2023-09-25 12:13:17 +00:00