From ebf96164a89eaaa09a931f7b9af682b7bb712799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Fri, 23 Sep 2022 08:56:53 +0200 Subject: [PATCH] finalize_sdk.py: strip '-stubs' from stub jar filenames Rename stubs jar from '*-stubs.jar' to '*.jar' when importing artifacts. (This was supposed to be part of b9868b1a586 but was lost in a rebase.) Bug: 235578272 Test: manual: run finalize_sdk.py and inspect prebuilts/sdk/extensions Change-Id: I93a3ef6f75a566ff5d0c525a15e2003fb7b890ed --- tools/finalize_sdk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/finalize_sdk.py b/tools/finalize_sdk.py index f41a816..0b9fbdf 100755 --- a/tools/finalize_sdk.py +++ b/tools/finalize_sdk.py @@ -90,6 +90,11 @@ def maybe_tweak_compat_stem(file): new_stem = file.stem new_stem = new_stem.replace('art.module.public.api', 'art') new_stem = new_stem.replace('conscrypt.module.public.api', 'conscrypt') + + # The stub jar artifacts from official builds are named '*-stubs.jar', but + # the convention for the copies in prebuilts/sdk is just '*.jar'. Fix that. + new_stem = new_stem.replace('-stubs', '') + return file.with_stem(new_stem) if not os.path.isdir('build/soong'):