Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.
Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
Listing a property in multiple property structs would cause it to
add multiple dependencies with the same dependency tag, which would
trip the panic in getDirectDepInternal when calling
PathForModuleSrc. Dedup the properties with the android:"path"
struct tag across all property structs.
Test: path_properties_test.go
Change-Id: Ib6c0e7789443d340ee7551721df0135c5ee64c0f
android_test.go already sets up a global buildDir, no need to create
one in each test.
Test: All soong tests
Change-Id: Ib85cbf78c604ad3cef64aa00b6bd812a81496e9e
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output. For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files. Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).
Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
When extracting dependencies from properties tagged with
`android:"path"`, only look at the general property structs
and not the arch-specific ones. The necessary arch-specific
values will be appended into the general property structs.
Fixes: 128377112
Test: path_properties_test.go
Change-Id: I35e35555d5b15473229a7458fcfc2c7dacaec889
Add a mutator pass after DepsMutator that visits every property
struct in every module looking for properties that have a tag
`android:"path"`, and automatically add a SourceDepTag dependency
on any module references (":module-name") found. Uses a cache to
store the mapping of property struct type to locations of
properties with the tag.
Test: android/path_properties_test.go
Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742