Restrict replacements of source dependencies with prebuilts am: 80342d72d0 am: 403b15074f

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1351596

Change-Id: I738152767fe955ec448471c60f246d58a96d4d7a
This commit is contained in:
Paul Duffin
2020-07-08 18:33:57 +00:00
committed by Automerger Merge Worker
4 changed files with 29 additions and 3 deletions

View File

@@ -718,9 +718,8 @@ func TestJavaSdkLibraryImport_Preferred(t *testing.T) {
checkModuleDependencies(t, ctx, "sdklib", "android_common", []string{
`dex2oatd`,
`prebuilt_sdklib`,
// This should be sdklib.stubs but is switched to the prebuilt because it is preferred.
`prebuilt_sdklib.stubs`,
`sdklib.impl`,
`sdklib.stubs`,
`sdklib.stubs.source`,
`sdklib.xml`,
})

View File

@@ -70,6 +70,12 @@ func (tag scopeDependencyTag) extractDepInfo(ctx android.ModuleContext, dep andr
}
}
var _ android.ReplaceSourceWithPrebuilt = (*scopeDependencyTag)(nil)
func (tag scopeDependencyTag) ReplaceSourceWithPrebuilt() bool {
return false
}
// Provides information about an api scope, e.g. public, system, test.
type apiScope struct {
// The name of the api scope, e.g. public, system, test