taskcluster/scripts/misc/android-gradle-dependencies/after.sh
author Nick Alexander <nalexander@mozilla.com>
Thu, 26 Oct 2017 11:00:36 -0700
changeset 399326 f918500d9cf5112b70bc8e0a120df435b02252b7
parent 399195 64f82460345884dd0f5935645765acccf771d7c4
child 399607 ef04f3ad847540c876c130b7d140a960d922a024
permissions -rwxr-xr-x
Bug 1411654 - Part 1: Upgrade to Android-Gradle 3.0+ and build-tools;26.0.2. r=maliu New Android-Gradle plugins pin the build-tools version, and we want to be consistent between Gradle and moz.build. MozReview-Commit-ID: ApWS4rHzPuH

#!/bin/bash -vex

set -x -e

echo "running as" $(id)

: WORKSPACE ${WORKSPACE:=/builds/worker/workspace}
: GRADLE_VERSION ${GRADLE_VERSION:=4.1}

set -v

# Package everything up.
pushd $WORKSPACE
mkdir -p android-gradle-dependencies /builds/worker/artifacts

cp -R ${NEXUS_WORK}/storage/jcenter android-gradle-dependencies
cp -R ${NEXUS_WORK}/storage/google android-gradle-dependencies

# The Gradle wrapper will have downloaded and verified the hash of exactly one
# Gradle distribution.  It will be located in $GRADLE_USER_HOME, like
# ~/.gradle/wrapper/dists/gradle-2.7-all/$PROJECT_HASH/gradle-2.7-all.zip.  We
# want to remove the version from the internal directory for use via tooltool in
# a mozconfig.
cp ${GRADLE_USER_HOME}/wrapper/dists/gradle-${GRADLE_VERSION}-all/*/gradle-${GRADLE_VERSION}-all.zip gradle-${GRADLE_VERSION}-all.zip
unzip -q gradle-${GRADLE_VERSION}-all.zip
mv gradle-${GRADLE_VERSION} android-gradle-dependencies/gradle-dist

tar cf - android-gradle-dependencies | xz > /builds/worker/artifacts/android-gradle-dependencies.tar.xz

popd