From 4f707295e2084457a0a01526f55838f946f4c3fb Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 16 Jan 2025 14:12:31 +0000 Subject: Replace --sdk-extension-root with --android-jar-pattern Previously, the only way to specify the location of the SDK extension jars was to specify the `--sdk-extension-root` directory and then rely on Metalava's hard-coded pattern to find the jar files. However, it is now possible to specify the SDK extension jar pattern explicitly as an `--android-jar-pattern` option. This change makes use of that new capability to specify patterns for the SDK extension jars appropriate for the API surface being generated and removes the `--sdk-extension-root` option altogether. Bug: 259115852 Test: # Before applying this change run: tools/metalava/scripts/gather-android-metalava-artifacts.py before # After applying this change run: tools/metalava/scripts/gather-android-metalava-artifacts.py after # Make sure that there are no differences. meld before after Change-Id: I4db9d4aa7b1ca3ef35a0778889f70acba491908d --- java/droidstubs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/droidstubs_test.go') diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go index 37740ae43..ad47210a1 100644 --- a/java/droidstubs_test.go +++ b/java/droidstubs_test.go @@ -303,7 +303,7 @@ func TestDroidstubsWithSdkExtensions(t *testing.T) { m := ctx.ModuleForTests("baz-stubs", "android_common") manifest := m.Output("metalava.sbox.textproto") cmdline := String(android.RuleBuilderSboxProtoForTests(t, ctx, manifest).Commands[0].Command) - android.AssertStringDoesContain(t, "sdk-extensions-root present", cmdline, "--sdk-extensions-root sdk/extensions") + android.AssertStringDoesContain(t, "android-jar-pattern present", cmdline, "--android-jar-pattern sdk/extensions/{version:extension}/public/{module}.jar") android.AssertStringDoesContain(t, "sdk-extensions-info present", cmdline, "--sdk-extensions-info sdk/extensions/info.txt") } -- cgit v1.2.3-59-g8ed1b