diff options
| author | 2024-01-30 22:56:10 +0000 | |
|---|---|---|
| committer | 2024-01-30 22:56:10 +0000 | |
| commit | 6a830dc530470329ef8ef3bba08b50f8999cf5f6 (patch) | |
| tree | 97ea6049be39397cab8b52d333b7b4cd8c7c80d5 /java/java.go | |
| parent | 3691588436e39c864fef84a6ca915e956457923f (diff) | |
| parent | 5809f65748ae13ee9f2ead57e38149cf85a0a7c1 (diff) | |
Merge "Support mechanism to select a specific version of module sdk prebuilt" into main am: 5809f65748
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2935330
Change-Id: I300fa14f92d53d87c6fa51517974e3450bd1c836
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go index 8c56bd771..f806298bf 100644 --- a/java/java.go +++ b/java/java.go @@ -2090,6 +2090,11 @@ type ImportProperties struct { // that depend on this module, as well as to aidl for this module. Export_include_dirs []string } + + // Name of the source soong module that gets shadowed by this prebuilt + // If unspecified, follows the naming convention that the source module of + // the prebuilt is Name() without "prebuilt_" prefix + Source_module_name *string } type Import struct { @@ -2163,12 +2168,16 @@ func (j *Import) PrebuiltSrcs() []string { return j.properties.Jars } +func (j *Import) BaseModuleName() string { + return proptools.StringDefault(j.properties.Source_module_name, j.ModuleBase.Name()) +} + func (j *Import) Name() string { return j.prebuilt.Name(j.ModuleBase.Name()) } func (j *Import) Stem() string { - return proptools.StringDefault(j.properties.Stem, j.ModuleBase.Name()) + return proptools.StringDefault(j.properties.Stem, j.BaseModuleName()) } func (a *Import) JacocoReportClassesFile() android.Path { |