From 3f0290ef7940c70a491dcbd4b57cabd8b2e753ef Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 30 Jun 2021 18:25:36 +0100 Subject: Support using java_sdk_library components in stub_libs Previously, if a bootclasspath_fragment had both a java_sdk_library module and one of its components in stub_libs properties they would be treated as separate modules instead of simply different APIs from the same module. That would result in them both providing stub dex jars to "hiddenapi list" which would fail because it found duplicate definitions of the same class. e.g. Specifying something like this: api: { stub_libs: [ "art.module.public.api", ], }, core_platform_api: { stub_libs: [ "art.module.public.api.stubs.module_lib", ], }, would cause "hiddenapi list" to fail because it would have been passed paths to two dex jars (actually the same dex jar but that does not matter) each of which defined the same class, e.g. java.lang.Object. This change treats the "art.module.public.api.stubs.module_lib" and "art.module.public.api" modules as being the same for the purposes of hidden API processing. Bug: 192446466 Test: m nothing Change-Id: I9de96337f64f26e24cff040d4bbed9eecc67b1ed --- java/bootclasspath_fragment_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/bootclasspath_fragment_test.go') diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go index b46988636..3d0e1558f 100644 --- a/java/bootclasspath_fragment_test.go +++ b/java/bootclasspath_fragment_test.go @@ -197,7 +197,7 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) { ], }, core_platform_api: { - stub_libs: ["mycoreplatform"], + stub_libs: ["mycoreplatform.stubs"], }, } -- cgit v1.2.3-59-g8ed1b