Add new properties to aid in removing the 1-variant fallback
These new properties are essentially methods to specify "outgoing
transitions" in blueprint files. There are lots of host tests
that want to include apps built for device in their data, so they
need a property that adds dependencies based on the device variants
instead of copying the same host variants.
After this cl is submitted, I'll do an LSC to update all the usages
that are relying on the 1-variant fallback to use these properties
instead.
Bug: 372091092
Test: m nothing --no-skip-soong-tests
Change-Id: I45b8fb024da120ad61606e3a21de86e4392be2a4
diff --git a/python/python.go b/python/python.go
index 01ac86c..d3e5743 100644
--- a/python/python.go
+++ b/python/python.go
@@ -90,6 +90,11 @@
// the test. the file extension can be arbitrary except for (.py).
Data []string `android:"path,arch_variant"`
+ // Same as data, but will add dependencies on modules using the device's os variation and
+ // the common arch variation. Useful for a host test that wants to embed a module built for
+ // device.
+ Device_common_data []string `android:"path_device_common"`
+
// list of java modules that provide data that should be installed alongside the test.
Java_data []string
@@ -451,6 +456,7 @@
// expand data files from "data" property.
expandedData := android.PathsForModuleSrc(ctx, p.properties.Data)
+ expandedData = append(expandedData, android.PathsForModuleSrc(ctx, p.properties.Device_common_data)...)
// Emulate the data property for java_data dependencies.
for _, javaData := range ctx.GetDirectDepsWithTag(javaDataTag) {