diff options
author | Alan Viverette <alanv@google.com> | 2017-06-06 14:21:29 -0400 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2017-06-06 14:56:54 -0400 |
commit | 5bfe05b6cba820762012186099a78b668649d13d (patch) | |
tree | 96c5ba7c1bd2dec9ce988bebd7cd628a6cb1f8af | |
parent | 802c9d1e122820ae6a44b96450d5545c08a0455e (diff) | |
download | sdk-5bfe05b6cba820762012186099a78b668649d13d.tar.gz |
Modify update script to use top-of-tree for support library
Moves multidex out of support/ since it's not part of the build.
Test: ./update_current.py <build-id> --support
Bug: 62377528
Change-Id: I21f2d9df8ecd89792509abeec3422ca3000f9990
-rw-r--r-- | current/Android.mk | 10 | ||||
-rw-r--r-- | current/multidex/instrumentation/android-support-multidex-instrumentation.jar (renamed from current/support/multidex/instrumentation/android-support-multidex-instrumentation.jar) | bin | 2470 -> 2470 bytes | |||
-rw-r--r-- | current/multidex/library/android-support-multidex.jar (renamed from current/support/multidex/library/android-support-multidex.jar) | bin | 21329 -> 21329 bytes | |||
-rwxr-xr-x | update_current.py | 28 |
4 files changed, 22 insertions, 16 deletions
diff --git a/current/Android.mk b/current/Android.mk index c3c5b79f7..d176031ae 100644 --- a/current/Android.mk +++ b/current/Android.mk @@ -23,9 +23,17 @@ LOCAL_PATH := $(call my-dir) # make target artifacts with prebuilts. ifneq ($(TARGET_BUILD_APPS),) include $(CLEAR_VARS) -LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ + +# Set up prebuilts for the core Support Library artifacts. +LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += \ $(patsubst $(LOCAL_PATH)/%,%,\ $(shell find $(LOCAL_PATH)/support -name "*.jar")) + +# Set up prebuilts for additional non-core library artifacts. +LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += \ + $(patsubst $(LOCAL_PATH)/%,%,\ + $(shell find $(LOCAL_PATH)/multidex -name "*.jar")) + include $(BUILD_MULTI_PREBUILT) # Generates the v4, v13, and appcompat libraries with static dependencies. diff --git a/current/support/multidex/instrumentation/android-support-multidex-instrumentation.jar b/current/multidex/instrumentation/android-support-multidex-instrumentation.jar Binary files differindex c217ff10d..c217ff10d 100644 --- a/current/support/multidex/instrumentation/android-support-multidex-instrumentation.jar +++ b/current/multidex/instrumentation/android-support-multidex-instrumentation.jar diff --git a/current/support/multidex/library/android-support-multidex.jar b/current/multidex/library/android-support-multidex.jar Binary files differindex 0777203fc..0777203fc 100644 --- a/current/support/multidex/library/android-support-multidex.jar +++ b/current/multidex/library/android-support-multidex.jar diff --git a/update_current.py b/update_current.py index db2675e1f..5b3045a63 100755 --- a/update_current.py +++ b/update_current.py @@ -96,6 +96,7 @@ def transform_support(repoDir): maven_lib_info = {} + # Find the latest revision for each artifact. for root, dirs, files in os.walk(repoDir): for file in files: matcher = artifact_pattern.match(file) @@ -185,7 +186,7 @@ def fetch_artifact(target, buildId, artifact_path): def update_support(target, buildId): platform = 'darwin' if 'mac' in target else 'linux' - artifact_path = fetch_artifact(target, buildId, 'sdk-repo-%s-m2repository-%s.zip' % (platform, buildId)) + artifact_path = fetch_artifact(target, buildId, 'top-of-tree-m2repository-%s.zip' % (buildId)) if not artifact_path: return @@ -235,20 +236,13 @@ parser = argparse.ArgumentParser( parser.add_argument( 'buildId', type=int, - nargs='?', help='Build server build ID') parser.add_argument( - '--support', - default='support_library', - help='Specifies the build server target from which the m2repository ZIP is obtained') + '-s', '--support', action="store_true", + help='If specified, updates only the Support Library') parser.add_argument( - '--sdk_repo', - default='sdk_phone_armv7-sdk_mac', - help='Specifies the build server target from which the platforms ZIP is obtained') -parser.add_argument( - '--system', - default='sdk_phone_armv7-sdk_mac', - help='Specifies the build server target from which the android_system JAR is obtained') + '-p', '--platform', action="store_true", + help='If specified, updates only the Android Platform') args = parser.parse_args() if not args.buildId: parser.error("You must specify a build ID") @@ -263,9 +257,13 @@ except subprocess.CalledProcessError: sys.exit(1) try: - update_support(args.support, args.buildId) - update_sdk_repo(args.sdk_repo, args.buildId) - update_system(args.system, args.buildId) + has_args = args.support or args.platform + + if has_args and args.support: + update_support('support_library', args.buildId) + if has_args and args.platform: + update_sdk_repo('sdk_phone_armv7-sdk_mac', args.buildId) + update_system('sdk_phone_armv7-sdk_mac', args.buildId) # Commit all changes. subprocess.check_call(['git', 'add', current_path]) |