diff options
author | 2024-01-30 22:43:33 +0000 | |
---|---|---|
committer | 2024-01-30 22:43:33 +0000 | |
commit | 5809f65748ae13ee9f2ead57e38149cf85a0a7c1 (patch) | |
tree | 23984c7c3f4eecfee726dc7839e07607935dc0d0 /java/java.go | |
parent | e288043ee76328311e5907c9e5a0d00771379c8c (diff) | |
parent | 3cf0463a470549d3faea79cea5e1ae5573243a78 (diff) |
Merge "Support mechanism to select a specific version of module sdk prebuilt" into main
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 { |