8803ebb470
We haven't done this in a while. The only interesting change I've noticed so far is that we no longer need to link libandroid_support when targeting API 21+. Change-Id: I6506fbe7bd02534f1ea136f2164acab7f44c29e0 Reviewed-on: https://skia-review.googlesource.com/128009 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
40 lines
904 B
Python
Executable File
40 lines
904 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
|
|
"""Create the asset."""
|
|
|
|
|
|
import argparse
|
|
import glob
|
|
import os.path
|
|
import shutil
|
|
import subprocess
|
|
|
|
NDK_VER = "android-ndk-r17"
|
|
NDK_URL = \
|
|
"https://dl.google.com/android/repository/%s-linux-x86_64.zip" % NDK_VER
|
|
|
|
def create_asset(target_dir):
|
|
"""Create the asset."""
|
|
subprocess.check_call(["curl", NDK_URL, "-o", "ndk.zip"])
|
|
subprocess.check_call(["unzip", "ndk.zip", "-d", target_dir])
|
|
for f in glob.glob(os.path.join(target_dir, NDK_VER, "*")):
|
|
shutil.move(f, target_dir)
|
|
subprocess.check_call(["rm", "ndk.zip"])
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('--target_dir', '-t', required=True)
|
|
args = parser.parse_args()
|
|
create_asset(args.target_dir)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|