| #!/bin/sh |
| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| SCRIPT_DIR=$(dirname $(realpath $0)) |
| CHROMIUM_DIR=${SCRIPT_DIR}/../../../.. |
| |
| if [[ $# > 0 ]]; then |
| cat ${SCRIPT_DIR}/README.md |
| exit 1 |
| fi |
| |
| set -e |
| |
| ${CHROMIUM_DIR}/third_party/gradle_wrapper/gradlew \ |
| -b ${SCRIPT_DIR}/build.gradle setUpRepository |
| |
| # Formatting the GN file is both required before committing and useful for |
| # getting a cleaner diff to see the changes. |
| gn format ${CHROMIUM_DIR}/third_party/android_deps/BUILD.gn |
| |
| # New AAR files require a .info file to describe them that is generated by GN. |
| # We run GN in a dummy repo to avoid polluting the local GN args. The output |
| # we care about will be added in the repo. |
| GN_ARGS="update_android_aar_prebuilts=true target_os=\"android\" "\ |
| "enable_android_deps_repository=true " |
| gn gen /tmp/dummy_gn_run --args="$GN_ARGS" |
| |
| echo -e "------------------------------------------------------------\n" \ |
| "Instructions to upload CIPD packages are available in each" \ |
| "package's 'cipd.yaml' file. To see which ones changed and need" \ |
| "to be updated, run\n" \ |
| " git diff DEPS\n" \ |
| "\n" \ |
| "If an existing package needs to be reuploaded, modify the last" \ |
| "number of the CIPD package version (e.g. 27.0.0-cr1) and update"\ |
| "DEPS accordingly.\n" \ |
| "\n" \ |
| "To test the new build once the packages are uploaded, before a" \ |
| "new build run the following commands:\n" \ |
| " git clean -dfX third_party/android_deps/repository\n" \ |
| " rm -rf .cipd\n" \ |
| " gclient sync -r src@HEAD\n" \ |
| "\n" \ |
| "\n------------------------------------------------------------" |