summaryrefslogtreecommitdiff
path: root/java/app.go
diff options
context:
space:
mode:
author Jaewoong Jung <jungjw@google.com> 2020-12-07 14:33:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-12-07 14:33:17 +0000
commit71debbfcc5418929dca12cd6bfe1a1e9030a23cc (patch)
tree85910dbb34c0bd079953aecca7bb9799267442f3 /java/app.go
parent25c14959a2c1bac65fbfbe51693a5d6717c5ca26 (diff)
parent84f1b808664b9f764de6e97ba312911d3834e2a1 (diff)
Merge "No matching variant android_app_import fix"
Diffstat (limited to 'java/app.go')
-rwxr-xr-xjava/app.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/app.go b/java/app.go
index 4bf9d33ea..e6d9550ec 100755
--- a/java/app.go
+++ b/java/app.go
@@ -1400,6 +1400,13 @@ func (a *AndroidAppImport) processVariants(ctx android.LoadHookContext) {
archProps := reflect.ValueOf(a.archVariants).Elem().FieldByName("Arch")
archType := ctx.Config().AndroidFirstDeviceTarget.Arch.ArchType
MergePropertiesFromVariant(ctx, &a.properties, archProps, archType.Name)
+
+ if String(a.properties.Apk) == "" {
+ // Disable this module since the apk property is still empty after processing all matching
+ // variants. This likely means there is no matching variant, and the default variant doesn't
+ // have an apk property value either.
+ a.Disable()
+ }
}
func MergePropertiesFromVariant(ctx android.EarlyModuleContext,