summaryrefslogtreecommitdiff
path: root/android/androidmk.go
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-24 18:26:22 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-24 18:26:22 -0700
commitfc5e8dc9c38db6628ed1d9172161187da74b066f (patch)
treed9f495586f867878d601c34c59eb3c49ec3d5a53 /android/androidmk.go
parent1248ced0cad29018090e65e3762585cdd774e864 (diff)
parentc2e8b6c102f4b4b44e2568f07d95fc674bbd2ef0 (diff)
Snap for 13264465 from c2e8b6c102f4b4b44e2568f07d95fc674bbd2ef0 to 25Q2-release
Change-Id: I6875fd165cc96cc880a3ac7842a516a7b9e70978
Diffstat (limited to 'android/androidmk.go')
-rw-r--r--android/androidmk.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/android/androidmk.go b/android/androidmk.go
index 7cc6aef00..e32835946 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -435,13 +435,18 @@ func getDistContributions(ctx ConfigAndOtherModuleProviderContext, mod Module) *
suffix = *dist.Suffix
}
- productString := ""
- if dist.Append_artifact_with_product != nil && *dist.Append_artifact_with_product {
- productString = fmt.Sprintf("_%s", ctx.Config().DeviceProduct())
+ prependProductString := ""
+ if proptools.Bool(dist.Prepend_artifact_with_product) {
+ prependProductString = fmt.Sprintf("%s-", ctx.Config().DeviceProduct())
}
- if suffix != "" || productString != "" {
- dest = strings.TrimSuffix(dest, ext) + suffix + productString + ext
+ appendProductString := ""
+ if proptools.Bool(dist.Append_artifact_with_product) {
+ appendProductString = fmt.Sprintf("_%s", ctx.Config().DeviceProduct())
+ }
+
+ if suffix != "" || appendProductString != "" || prependProductString != "" {
+ dest = prependProductString + strings.TrimSuffix(dest, ext) + suffix + appendProductString + ext
}
if dist.Dir != nil {