From 80342d72d0d1a1367f96a09b1d151b59fe78dd1c Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 26 Jun 2020 22:08:43 +0100 Subject: Restrict replacements of source dependencies with prebuilts Previously, when java_sdk_library_import was preferred over a java_sdk_library the latter ends up depending on the prebuilt child modules created by the java_sdk_library_import instead of the source child modules that it created itself. That was because all dependencies on those source child modules were replaced with the corresponding prebuilt child modules. This change prevents those dependencies from being replaced to preserve the dependencies from java_sdk_library onto its source child modules by making the replacement conditional depending on the tag used. It also updates the affected test. Bug: 159902351 Test: m nothing Change-Id: I4441b901dedfd44b9769df1ac2e248b94834cf85 --- java/java_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 23dcd53ab..59a2ce7aa 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -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`, }) -- cgit v1.2.3-59-g8ed1b