diff options
| author | 2023-08-03 23:02:26 +0000 | |
|---|---|---|
| committer | 2023-08-07 19:18:03 +0000 | |
| commit | c53767e434985f05d71e763b762bf8b420396389 (patch) | |
| tree | 5393848c52c7013527c8a374dda48a98ad1748d6 /java/system_modules_test.go | |
| parent | 3131d679f2645a819183b80dc62bca64d07c55fb (diff) | |
Handle .proto files that end up in a different package
Bazel poses a strict requirement that .proto files and proto_library
must be in the same package. This CL handles this automatically by
creating the proto_library in a separate dir/package if necessary
Implementation details
- Partition the `srcs` by package. `srcs` has been computed using
`transformSubpackagePath`, so the information about packages is
available at this point
- Create a proto_library in each package by using
`CommonAttributes.Dir`. Collect all these additional libraries
and put them in `info.Proto_libraries` so that they get added as deps
of (cc|python|...)_proto_library
- Add an import_prefix to the proto_library in subpackages relative to
the current directory. This relies on the assumption that every src is
beneath the current directory (Soong will complain if a path in
Android.bp contains ../)
filegroup module type uses a separate code-path to create proto_library.
This will be handled in the next CL in stack.
Test: bp2build unit tests
Test: TH
Test: Built the failing internal module mentioned in
b/292583584#comment1
Bug: 292583584
Change-Id: I437fc89092321b26c5f0511387cde9e84084d6f9
Diffstat (limited to 'java/system_modules_test.go')
0 files changed, 0 insertions, 0 deletions