Skip to content

Commit

Permalink
Add a source_module_name to android_app am: efa1465 am: 85437f2
Browse files Browse the repository at this point in the history
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982635

Change-Id: I208e1e0dac79ee1e865785a5374a958c487914bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
  • Loading branch information
dasspandan authored and android-build-merge-worker-robot committed Feb 29, 2024
2 parents 4bb9662 + 85437f2 commit d693e1c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions java/app_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ type AndroidAppImportProperties struct {
// Whether or not to skip checking the preprocessed apk for proper alignment and uncompressed
// JNI libs and dex files. Default is false
Skip_preprocessed_apk_checks *bool

// 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
}

func (a *AndroidAppImport) IsInstallable() bool {
Expand Down Expand Up @@ -274,6 +279,10 @@ func (a *AndroidAppImport) InstallApkName() string {
return a.BaseModuleName()
}

func (a *AndroidAppImport) BaseModuleName() string {
return proptools.StringDefault(a.properties.Source_module_name, a.ModuleBase.Name())
}

func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext) {
if a.Name() == "prebuilt_framework-res" {
ctx.ModuleErrorf("prebuilt_framework-res found. This used to have special handling in soong, but was removed due to prebuilt_framework-res no longer existing. This check is to ensure it doesn't come back without readding the special handling.")
Expand Down

0 comments on commit d693e1c

Please sign in to comment.