Commit graph

59038 commits

Author SHA1 Message Date
Jihoon Kang
423d229c3b Add phony rule for java_api_library module type
Context
- Create phony rule for java_api_library module with its artifact
  (*.jar) as dependency
- Fix source directory base mislinkage issue for input text files passed
  from java_api_contributions modules

Test: m
Change-Id: I055332fd5bc7ef0d03e7b311b0efa93f4454102f
2022-11-29 23:37:55 +00:00
Spandan Das
53e680d2ae Merge "Add min_sdk_version to aidlCmd for droidstubs" 2022-11-22 17:09:26 +00:00
Colin Cross
262d65d481 Merge "Remove SettingsOverlay* from legacyCorePlatformApiModules" 2022-11-22 16:39:04 +00:00
Paul Duffin
032734ca9f Merge "Remove support for unused env vars from sdk snapshot generation" 2022-11-22 15:56:04 +00:00
Treehugger Robot
dd33a493fb Merge "use CommonAttributes for Tags in protos filegroups" 2022-11-22 15:46:59 +00:00
Treehugger Robot
657ee23d83 Merge "Pass "-Xgc:CMC" to dex2oat when userfaultfd GC is enabled." 2022-11-22 15:10:20 +00:00
Spandan Das
6960ac12ac Add jarjar's deps to bp2build allowlist
jarjar switched its deps from prebuilts to source (aosp/2305413). Add
the source directory to the allowlist. This should fix broken bp2build
presubmits

Test: b build //external/jarjar
Change-Id: Ic7f37ea0ac167dc3b0f605ca0e67f8740652e0b1
2022-11-22 04:58:06 +00:00
Spandan Das
757b666c7f Add min_sdk_version to aidlCmd for droidstubs
JavaDoc's implementation of `aidlFlags` omits `min_sdk_version`, and
therefore aidl compiler would default it to a default version.

To fix this, pass the min_sdk_version explicitly

Bug: 253122520
Test: TH
Test: go test ./java
Change-Id: Ia8f639174f8361136596d0e7b3286606f84705cd
2022-11-21 22:59:38 +00:00
Nikita Ioffe
663e060c64 Merge "Propagate stub_only_libs to the invocation generating stub sources" 2022-11-21 22:55:46 +00:00
Sam Delmerico
e9b33f70ae use CommonAttributes for Tags in protos filegroups
The Tags attribute is now available in CommonAttributes, and if we use
that one, we won't get errors with conflicting definitions of the
attribute if a global Tags value is added via CommonAttributes.

Test: m bp2build
Change-Id: I422ed817b84e6808ef60fe3599fe84332bc51d8e
2022-11-21 16:25:20 -05:00
Jihoon Kang
f33d92603e Merge "Add java/fuzz_test.go to test sources" 2022-11-21 19:29:58 +00:00
Jihoon Kang
ba36441424 Merge "Update java_api_library prop name" 2022-11-21 18:03:12 +00:00
Matt Gilbride
0e2c2aaa60 Merge "lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES" 2022-11-21 17:38:21 +00:00
Paul Duffin
6fcb32258a Merge "Revert "Improve error reporting when depending on prebuilt implementation jar"" 2022-11-21 17:20:03 +00:00
Treehugger Robot
91831b3e7c Merge "Use missing.x509.pem instead of missing.pem for faked missing certificates" 2022-11-21 16:04:40 +00:00
Nikita Ioffe
d732da7251 Propagate stub_only_libs to the invocation generating stub sources
In some cases the java_sdk_library needs to compile against hidden
platform APIs, in order to do so it needs to add impl_only_libs
dependency on the framework library, and set the sdk_version property to
the "core_*" one (e.g. core_platform).

However, if this java_sdk_library depends on the Android SDK in it's
stable API surface, then the setup above will break the stubs srcs
generation, as it uses the sdk_version of the java_sdk_library (e.g.
core_platform), which doesn't have symbols from the Android SDK.

This chage solves the problem by propagating the stub_only_libs to the
invocation that generates the stub sources. It allows the
java_sdk_libraries to add a stub_only_libs dependency on the
android_module_lib_stubs_current stubs library to fix their stubs build.

For more context see another change in this topic:
https://android-review.git.corp.google.com/c/platform/packages/modules/Virtualization/+/2310569

Bug: 243512044
Test: builds
Test: m nothing
Change-Id: Id745cfb2789901672561050c1c3f8bb163922379
2022-11-21 15:51:40 +00:00
Paul Duffin
7ed6ff8c76 Revert "Improve error reporting when depending on prebuilt implementation jar"
This reverts commit c61783b20d.

Bug: 257969510
Reason for revert: b/255275437 - breaks checkbuild target

Change-Id: I01f88053cc24dbc1a4eb5c009f15473bdff3d565
2022-11-21 10:57:30 +00:00
Martin Geisler
a512bb53ad Merge "rust: expand docstrings for Rust module types" 2022-11-21 10:33:56 +00:00
Martin Geisler
3e9a5d9e2f Merge "rust: Test with full Rust “crate_type”" 2022-11-21 10:29:42 +00:00
Martin Geisler
3e0efc52f3 Merge "rust: Fix indentation, convert to TABs" 2022-11-21 08:36:33 +00:00
Colin Cross
a54f4b5262 Use missing.x509.pem instead of missing.pem for faked missing certificates
sign_target_files_apks and check_target_files_signatures require that
certificates have a .x509.pem extension and reject missing.pem.  Using
missing.x509.pem instead.

Bug: 259861670
Change-Id: I0b2367213a8cbe390c231a8609bb04df2b125eda
2022-11-21 04:35:55 +00:00
Usta (Tsering) Shrestha
1ad62c7073 Merge "ShouldKeepExistingBuldFileForDir look up by dir" 2022-11-19 03:55:46 +00:00
Jihoon Kang
60d4a09cb5 Update java_api_library prop name
Context
- Update java_api_library module's prop name from api_providers to
  api_contributions to adjust to module rename
- Update variables name correspondingly to enhance readability

Test: m
Change-Id: I93b941a572e04bed6084109d151ba83a82715651
2022-11-19 01:03:03 +00:00
mattgilbride
e17645fe30 lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES
Before this change, ANDROID_LINT_EXTRA_CHECK_MODULES was only read if
ANDROID_LINT_CHECK was also set.  This change allows an entire module of
checks to be added to lint without having to specify all of the
individuals with ANDROID_LINT_CHECK.

This is part of a workaround to run some lint checks globally, but is
useful to provide more flexibility generally.

Bug: 236558918
Test: manually tested with AndroidFrameworkLintChecker
Change-Id: I2d3ec8a997d902c9d00a577a56f4b152b10e078a
2022-11-18 20:56:05 +00:00
Martin Geisler
67ec054ad0 rust: expand docstrings for Rust module types
This gives a tiny bit of context in the documentation and allows
people to more easily map the Soong build rules to the Rust
terminology.

Bug: 254469782
Test: atest
Change-Id: Ia8fde42c15919dd03954e9ebf83022d0a569407e
2022-11-18 12:11:03 +01:00
Martin Geisler
b8a4c2cad1 rust: Test with full Rust “crate_type”
What we call “static” in Soong is called “staticlib” in Rust, see
https://doc.rust-lang.org/reference/linkage.html for details.

Bug: 254469782
Test: atest
Change-Id: I65bba511d3ce8e7e53c6a1de3e77e30568934ce7
2022-11-18 12:10:58 +01:00
Martin Geisler
bd736daba3 rust: Fix indentation, convert to TABs
The two “rust_ffi_host” modules looked different in my editor because
one was indented with TABs and the other with spaces. They now
consistently use spaces (like the other examples in this file).

Test: atest
Change-Id: I7d0cdba5978da92a1a299bb290472403d4f13462
2022-11-18 11:59:09 +01:00
Treehugger Robot
6f235d9b39 Merge "Add props property to add_avb_hash_footer" 2022-11-18 06:19:31 +00:00
Jiyong Park
bc48548df1 Add props property to add_avb_hash_footer
It is used to provide name:value properties to the footer. Value can be
from a text in *.bp file or a binary file referenced via the `file`
prop. e.g.

```
avb_add_hash_footer {
	...
	props: [
		{
			name: "string_prop",
			value: "string_value",
		},
		{
			name: "binary_prop",
			file: "a_binary_file_name",
		},
	],
}
```

This CL also adds a test for the module type which has been missing.

Bug: 256148237
Test: m nothing
Change-Id: Idf55b308c8ce760387c01a847846b42d1aebe4ea
2022-11-18 12:56:12 +09:00
Colin Cross
9e8ab16fae Merge "Remove modules form legacyCorePlatformModules that build in internal master" 2022-11-18 03:35:52 +00:00
Yabin Cui
df3168f60d Merge "Allow deprecated flags when building with LLVM_NEXT." 2022-11-18 00:40:57 +00:00
Treehugger Robot
0351be5adc Merge "Provide Bazel timing breakdown for the mixed builds" 2022-11-18 00:20:52 +00:00
Jihoon Kang
5cb82e36be Add java/fuzz_test.go to test sources
Context
- fuzz_test.go is not listed in the soong/java test sources and is not
  running on CI.

Implementation
- Fix fuzz_test.go and add to test sources

Test: m
Change-Id: If2685c646dec4885fc42d7760992309bfa9da382
2022-11-17 21:46:48 +00:00
Yabin Cui
758dfa1c28 Allow deprecated flags when building with LLVM_NEXT.
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
is deprecated in the next compiler. So add -Wno-unused-command-line-argument
to skip it.

Bug: 253033919
Bug: 259559364
Test: run test_compiler.py
Change-Id: I9133a36700afd3ef411092fd8133a7fe1c2c7343
2022-11-17 13:00:40 -08:00
Colin Cross
148917e5ab Merge "Remove modules from legacyCorePlatformApiModules that build without it" 2022-11-17 18:28:00 +00:00
Treehugger Robot
80850d8639 Merge "Fix the ABI dump directory name for vendor libraries" 2022-11-17 04:46:25 +00:00
Jihoon Kang
067e62e49f Merge "Create java_api_contribution and java_api_library module" 2022-11-17 03:55:43 +00:00
Sasha Smundak
4975c82666 Provide Bazel timing breakdown for the mixed builds
Instead of single event in the build metrics
```
| soong_build.mixed_build.bazel          | 1:17.1 |
```
it will now show:
```
| soong_build.mixed_build.bazel          | 1:17.1 |
| soong_build.mixed_build.bazel.cquery   |   51.9 |
| soong_build.mixed_build.bazel.aquery   |   23.1 |
| soong_build.mixed_build.bazel.symlinks |    2.1 |
```

Test: treehugger
Change-Id: I84a7dda6e3122860da9aaa98bfa6afe33d392dcf
2022-11-16 18:44:08 -08:00
Wei Li
c33c2e732a Merge "Fix the following issues in bazel_handler:" 2022-11-16 23:45:47 +00:00
Treehugger Robot
3d99948e29 Merge "Make htmlGzNotice an internal variable instead of apexBundle field." 2022-11-16 23:19:44 +00:00
Jihoon Kang
0ac87c21bd Create java_api_contribution and java_api_library module
Context
- Droidstubs module is currently responsible not only for java api stubs
  generation, but also for checking api equality and compatibility.
- Generating stubs with incomplete api text file that does not list
  entire api surface is done through metalava implicitly adding unlisted
  methods from java source files to the stubs in droidstubs module.
- These factors make java stubs generation harder to debug, thus
  introduce `java_api_contribution` and `java_api_library` modules to make java
  api stubs and jar generation more explicit in Android.bp level and
  eventually easier to debug.

Implementation
- `java_api_contribution` module is included in api domains' directory and
  lists api text file directory to be added to the api surface
- `java_api_library` collects all api text file that forms the api surface
  and creates stubs invoking metalava. Generated java stub files are
  converted into `.srcjar`, and eventually `.jar` file which is the complete
  api surface.

Test: m
Change-Id: I86f097cc8592334a5eaa900cec12764c5fcc09e7
2022-11-16 23:05:41 +00:00
Sam Delmerico
775f2cb3cd Merge "export neverallow include dir list to Bazel" 2022-11-16 20:52:17 +00:00
Treehugger Robot
b70f746eac Merge "go.mod readability improvement" 2022-11-16 20:49:05 +00:00
Ulya Trofimovich
a672771df9 Merge "Do not assume that boot image profile exists when building ART apex." 2022-11-16 19:36:31 +00:00
Jingwen Chen
4a9630b4ad Make htmlGzNotice an internal variable instead of apexBundle field.
It's not read outside of the function / action generation logic, so keep
it inside the function.

Test: presubmits
Fixes: 190817312
Change-Id: I0626e6c86adc584abb2a251cbc7ffb1bec2c7f59
2022-11-16 19:12:35 +00:00
Colin Cross
bf29be8f19 Merge "Remove modules that don't exist from legacyCorePlatformApiModules" 2022-11-16 18:09:07 +00:00
Colin Cross
e4b131a5da Merge changes I0886baa4,I584f98f9
* changes:
  Sort legacyCorePlatformApiModules
  Remove SystemUI from legacyCorePlatformApiModules
2022-11-16 17:02:01 +00:00
Wei Li
cbd181c8e8 Fix the following issues in bazel_handler:
1) Convert coverage path wildcard to regex values for --instrumentation_filter to Bazel.
2) Handle the error properly when aquery commmand returns error.

Bug: 258397103
Test: CIs
Change-Id: Ie7485c2c45f2eb0e1ca0dc60478aae04ab151b61
2022-11-16 08:59:23 -08:00
Alix Espino
3044987181 Merge "bp2build for java_library with .kt srcs or common_srcs" 2022-11-16 15:40:55 +00:00
Treehugger Robot
bd12239355 Merge "remove dead Bazel code from soong_ui" 2022-11-16 15:27:42 +00:00