Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc and ctx.ExpandSource into android.PathForModuleSrc, and deprecate them. When combined with the pathDepsMutator this will let all properties that take source paths also take filegroups or genrule outputs, as long as they are tagged with `android:"path"`. Test: All soong tests Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
This commit is contained in:
@@ -839,7 +839,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, apexType ap
|
||||
a.container_private_key_file = key
|
||||
}
|
||||
|
||||
manifest := ctx.ExpandSource(proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"), "manifest")
|
||||
manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"))
|
||||
|
||||
var abis []string
|
||||
for _, target := range ctx.MultiTargets() {
|
||||
@@ -936,7 +936,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, apexType ap
|
||||
}
|
||||
|
||||
if a.properties.AndroidManifest != nil {
|
||||
androidManifestFile := ctx.ExpandSource(proptools.String(a.properties.AndroidManifest), "androidManifest")
|
||||
androidManifestFile := android.PathForModuleSrc(ctx, proptools.String(a.properties.AndroidManifest))
|
||||
implicitInputs = append(implicitInputs, androidManifestFile)
|
||||
optFlags = append(optFlags, "--android_manifest "+androidManifestFile.String())
|
||||
}
|
||||
@@ -1015,7 +1015,7 @@ func (a *apexBundle) buildFlattenedApex(ctx android.ModuleContext) {
|
||||
if a.installable() {
|
||||
// For flattened APEX, do nothing but make sure that apex_manifest.json file is also copied along
|
||||
// with other ordinary files.
|
||||
manifest := ctx.ExpandSource(proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"), "manifest")
|
||||
manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"))
|
||||
|
||||
// rename to apex_manifest.json
|
||||
copiedManifest := android.PathForModuleOut(ctx, "apex_manifest.json")
|
||||
|
Reference in New Issue
Block a user