fetch core.current.stubs.jar to core.jar

core.jar is a stub library having core Java APIs. It is used when
sdk_version is set to "core_current".

Bug: 72206056
Test: m -j

Change-Id: I3baf5b22f800f35db5517c66f84e7b9c11b101c5
diff --git a/Android.mk b/Android.mk
index 64d631e..7cd8edb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -44,7 +44,7 @@
 
 endef
 
-$(foreach s,$(filter-out test_current,$(TARGET_AVAILABLE_SDK_VERSIONS)),\
+$(foreach s,$(filter-out test_current core_current,$(TARGET_AVAILABLE_SDK_VERSIONS)),\
   $(eval $(call declare_sdk_prebuilts,$(s))))
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/update_current.py b/update_current.py
index ba3e081..0f86319 100755
--- a/update_current.py
+++ b/update_current.py
@@ -264,6 +264,12 @@
 
         # Unclear if this is actually necessary.
         extract_to(zipFile, paths, 'framework.aidl', system_path)
+
+    artifact_path = fetch_artifact(target, build_id, 'core.current.stubs.jar')
+    if not artifact_path:
+        return False
+
+    mv(artifact_path, path(current_path, 'core.jar'))
     return True