1#!/bin/bash 2 3set -eu 4 5./mvnw clean install --projects '!guava-testlib,!guava-tests,!guava-bom,!guava-gwt' -Dmaven.test.skip=true -Dmaven.javadoc.skip=true 6./mvnw clean install --projects '!guava-testlib,!guava-tests,!guava-bom' -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -f android 7 8# Gradle Wrapper overwrites some files when it runs. 9# To avoid modifying the Git client, we copy everything we need to another directory. 10# That provides general hygiene, including avoiding release errors: 11# 12# Preparing to update Javadoc and JDiff for the release... 13# error: Your local changes to the following files would be overwritten by checkout: 14# integration-tests/gradle/gradle/wrapper/gradle-wrapper.jar 15# integration-tests/gradle/gradle/wrapper/gradle-wrapper.properties 16# integration-tests/gradle/gradlew 17# integration-tests/gradle/gradlew.bat 18# Please commit your changes or stash them before you switch branches. 19 20GRADLE_TEMP="$(mktemp -d)" 21trap 'rm -rf "${GRADLE_TEMP}"' EXIT 22 23# The Gradle tests need the pom.xml only to read its version number. 24# (And the file needs to be two directory levels up from the Gradle build file.) 25# TODO(cpovirk): Find a better way to give them that information. 26cp pom.xml "${GRADLE_TEMP}" 27 28for version in 5.6.4 7.0.2; do 29 # Enter a subshell so that we return to the current directory afterward. 30 ( 31 cp -r integration-tests "${GRADLE_TEMP}/${version}" 32 cd "${GRADLE_TEMP}/${version}/gradle" 33 ./gradlew wrapper --gradle-version="${version}" 34 ./gradlew testClasspath 35 ) 36done 37