1#!/bin/bash 2set -e 3 4cd "$(dirname $0)/../../" 5SCRIPT_DIR="$(pwd)" 6echo "Script running from $(pwd)" 7 8# resolve DIST_DIR 9if [ -z "$DIST_DIR" ]; then 10 DIST_DIR="$SCRIPT_DIR/out/dist" 11fi 12mkdir -p "$DIST_DIR" 13 14export OUT_DIR=out 15export DIST_DIR="$DIST_DIR" 16 17JAVA_HOME="$(pwd)/prebuilts/studio/jdk/linux" tools/gradlew -p tools/ publishLocal --stacktrace 18 19export LINT_VERSION=`grep -oP "(?<=baseVersion = ).*" tools/buildSrc/base/version.properties` 20export LINT_REPO="$(pwd)/out/repo" 21 22# Disabled temporarily due to lint binary compatibility breakage 23# tools/gradlew -p tools/metalava --no-daemon --stacktrace -PlintRepo=$LINT_REPO -PlintVersion=$LINT_VERSION 24