1#!/bin/bash 2set -veux -o pipefail 3 4if [[ -f /VERSION ]]; then 5 cat /VERSION 6fi 7 8readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)" 9 10"$GRPC_JAVA_DIR"/buildscripts/build_docker.sh 11"$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh /grpc-java/buildscripts/build_artifacts_in_docker.sh 12 13# grpc-android requires the Android SDK, so build outside of Docker and 14# use --include-build for its grpc-core dependency 15LOCAL_MVN_TEMP=$(mktemp -d) 16pushd "$GRPC_JAVA_DIR/android" 17../gradlew uploadArchives \ 18 --include-build "$GRPC_JAVA_DIR" \ 19 -Dorg.gradle.parallel=false \ 20 -PskipCodegen=true \ 21 -PrepositoryDir="$LOCAL_MVN_TEMP" 22popd 23 24readonly MVN_ARTIFACT_DIR="${MVN_ARTIFACT_DIR:-$GRPC_JAVA_DIR/mvn-artifacts}" 25mkdir -p "$MVN_ARTIFACT_DIR" 26cp -r "$LOCAL_MVN_TEMP"/* "$MVN_ARTIFACT_DIR"/ 27