platform_build_soong/apex
Spandan Das 161e468774 Use source_module_name to determine the contents of prebuilt apexes
There are a couple of instances in apex/ and java/ that rely on the naming
convention that the jars exported by prebuilt apexes follow the name of
the java_sdk_library_import, minus the prebuilt_ prefix. With muliple
module sdk prebuilts in trunk stable, this naming convention might not
be valid. Use `source_module_name` instead.

```
prebuilt_sscp_fragment {name: "", contents: ["service-foo.v2"]}
java_import {name: "service-foo.v2", source_module_name: "service-foo"},
```

We should use service-foo and not service-foo.v2 because
1. The prebuilt apex contains service-foo.dex
2. PRODUCT_*JARS will contain service-foo and not service-foo.v2

For clarity, this CL does not drop the current mechanism where prebuilt bcp
fragments create a dependency edge to prebuilt java or java_sdk_library
imports. There is still some discussion around whether we can remove
that completely (b/320711431). If we were to do that, then the
Android.bp files will become

```
prebuilt_sscp_fragment {name: "", contents: ["service-foo"]}
```

Bug: 322175508

Test: Added a unit test

Test: In internal, lunch cf_x86_64_only_phone-next-userdebug && m
nothing # .ninja files identical

Test: In internal, created a parallel set of v2 prebuilts of
java_sdk_library_import and prebuilt_bcp_fragments for adservices && m
nothing # build passes

Change-Id: Ia899d75e826fa1a559368d706eaa65835f748d40
2024-02-06 21:56:05 +00:00
..
Android.bp Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
androidmk.go Propagate AconfigFiles in ModuleBase. 2024-01-24 23:45:12 +00:00
apex.go Merge "Move ApexBundleInfoProvider from apex/ to android/" into main 2024-01-25 23:59:47 +00:00
apex_sdk_member.go Add apexes property to sdk 2022-07-06 15:58:43 +00:00
apex_singleton.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
apex_test.go Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main 2024-02-02 01:06:37 +00:00
bootclasspath_fragment_test.go Fix the args used to dexpreopt system server jars in prebuilt apexes 2024-01-26 18:06:41 +00:00
builder.go Add container property to aconfig_declarations. 2023-11-28 12:37:02 -08:00
classpath_element_test.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
deapexer.go Propagate profile_guided requirement of imports to top-level apex 2024-01-30 18:04:52 +00:00
dexpreopt_bootjars_test.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00
key.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
platform_bootclasspath_test.go Make hiddenAPIFlagFileCategory an int 2024-01-23 18:01:47 -08:00
prebuilt.go Use source_module_name to determine the contents of prebuilt apexes 2024-02-06 21:56:05 +00:00
systemserver_classpath_fragment_test.go Propagate profile_guided requirement of imports to top-level apex 2024-01-30 18:04:52 +00:00
TEST_MAPPING Add TEST_MAPPING for build/soong/apex 2019-08-07 17:33:24 +09:00
testing.go Add allowed-deps tests 2023-04-27 09:56:04 +09:00
vndk.go Soong works with empty VNDK version 2024-01-15 17:31:10 +09:00
vndk_test.go Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION 2024-02-01 11:20:14 +09:00