flutter/dev/bots/download_android_sdk.sh
Ian Hickson e768c92fbc
Add many more global analyses. (#47875)
* Update packages.

* Add many more global analyses.

* Catch trailing spaces and trailing newlines in all text files.
  Before we were only checking newly added files, but that means we
  missed some.

* Port the trailing spaces logic to work on Windows too.

* Correct all the files with trailing spaces and newlines.

* Refactor some of the dev/bots logic into a utils.dart library.
  Notably, the "exit" and "print" shims for testing are now usable
  from test.dart, analyze.dart, and run_command.dart.

* Add an "exitWithError" function that prints the red lines and
  then exits. This is the preferred way to exit from test.dart,
  analyze.dart, and run_command.dart.

* More consistency in the output of analyze.dart.

* Refactor analyze.dart to use the _allFiles file enumerating logic
  more widely.

* Add some double-checking logic to the _allFiles logic to catch
  cases where changes to that logic end up catching fewer files
  than expected (helps prevent future false positives).

* Add a check to prevent new binary files from being added to
  the repository. Grandfather in the binaries that we've already
  added.

* Update all the dependencies (needed because we now import crypto in
  dev/bots/analyze.dart).
2019-12-30 17:12:19 -08:00

29 lines
921 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
if [[ -z $ANDROID_SDK_TOOLS_URL || -z $ANDROID_HOME || -z $ANDROID_SDK_ROOT ]]; then
exit 0
fi
curl -L $ANDROID_SDK_TOOLS_URL --output android_sdk_tools.zip
mkdir -p $ANDROID_SDK_ROOT
unzip android_sdk_tools.zip -d $ANDROID_SDK_ROOT
rm android_sdk_tools.zip
yes | $ANDROID_SDK_ROOT/tools/bin/sdkmanager --licenses
$ANDROID_SDK_ROOT/tools/bin/sdkmanager tools
$ANDROID_SDK_ROOT/tools/bin/sdkmanager platform-tools
# this is large and we don't need it just yet
# $ANDROID_SDK_ROOT/tools/bin/sdkmanager emulator
$ANDROID_SDK_ROOT/tools/bin/sdkmanager "platforms;android-28" \
"build-tools;28.0.3" \
"platforms;android-27" \
"build-tools;27.0.3" \
"extras;google;m2repository" \
"extras;android;m2repository"