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 b9868b1a58 but was lost in a rebase.)

Bug: 235578272
Test: manual: run finalize_sdk.py and inspect prebuilts/sdk/extensions
Change-Id: I93a3ef6f75a566ff5d0c525a15e2003fb7b890ed
This commit is contained in:
Mårten Kongstad
2022-09-23 08:56:53 +02:00
parent be1e81e627
commit ebf96164a8

View File

@@ -90,6 +90,11 @@ def maybe_tweak_compat_stem(file):
new_stem = file.stem new_stem = file.stem
new_stem = new_stem.replace('art.module.public.api', 'art') new_stem = new_stem.replace('art.module.public.api', 'art')
new_stem = new_stem.replace('conscrypt.module.public.api', 'conscrypt') 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) return file.with_stem(new_stem)
if not os.path.isdir('build/soong'): if not os.path.isdir('build/soong'):