summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-10-28 13:02:51 +0100
committerPaul Duffin <paulduffin@google.com>2021-11-02 18:34:43 +0000
commit6815a316b1d258fd995371e47f66b31cada3d97f (patch)
tree8b421af279ce555d41a108f0080cb15bdbf5c8a3
parent9b7edceb93296f1ad4e00eca758ce9f45ee1d299 (diff)
downloadsdk-6815a316b1d258fd995371e47f66b31cada3d97f.tar.gz
Retrieve core-for-system-modules.jar for public and module-lib APIs
Updates the update_prebuilts.py script to retrieve the core-for-system-modules.jar file for the public and module-lib APIs from the specified build target when updating the platform (-p). It will fail if the files do not exist on the server. Bug: 204189791 Test: ./update_prebuilts.py -p 7862434 --sdk_target sdk_phone_armv7-sdk - fail as the file is missing. ./update_prebuilts.py -p --sdk_target sdk_phone_armv7-sdk 7875967 - works Change-Id: I529134dfaddf36cbce0a155380ef9b272e1f46c0
-rwxr-xr-xupdate_prebuilts/update_prebuilts.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/update_prebuilts/update_prebuilts.py b/update_prebuilts/update_prebuilts.py
index 6e8af1936..62f825486 100755
--- a/update_prebuilts/update_prebuilts.py
+++ b/update_prebuilts/update_prebuilts.py
@@ -530,7 +530,13 @@ def update_framework(target, build_id, sdk_dir):
if api_scope == 'core':
artifact_to_path = {'core.current.stubs.jar': path(target_dir, 'android.jar')}
else:
- artifact_to_path = {'apistubs/android/' + api_scope + '/*.jar': path(target_dir, '*')}
+ artifact_to_path = {
+ 'apistubs/android/' + api_scope + '/*.jar': path(target_dir, '*'),
+ }
+ if api_scope == 'public' or api_scope == 'module-lib':
+ # Distinct core-for-system-modules.jar files are only provided
+ # for the public and module-lib API surfaces.
+ artifact_to_path['system-modules/' + api_scope + '/core-for-system-modules.jar'] = path(target_dir, '*')
if not fetch_artifacts(target, build_id, artifact_to_path):
return False
@@ -547,7 +553,6 @@ def update_framework(target, build_id, sdk_dir):
'android.jar',
'framework.aidl',
'uiautomator.jar',
- 'core-for-system-modules.jar',
'data/annotations.zip',
'data/api-versions.xml']
for filename in extra_files: