Skip to content

Commit 445c113

Browse files
committed
ci: Compile with Java 11 and run tests with Java 8
1 parent b53beb4 commit 445c113

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.kokoro/nightly/downstream-protobuf-source-compatibility.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ source "${scriptDir}/common.sh"
2020

2121
validate_protobuf_compatibility_script_inputs
2222

23-
24-
java -version
25-
# Install to ~/.m2 because the generator tests require Gax testlibs
26-
mvn clean install -T 1C -DskipTests
27-
28-
export JAVA_HOME="${JAVA8_HOME}"
29-
java -version
30-
3123
# REPOS_UNDER_TEST Env Var accepts a comma separated list of googleapis repos to test. For Github CI,
3224
# this will be a single repo as Github will build a matrix of repos with each repo being tested in parallel.
3325
# For local invocation, you can pass a list of repos to test multiple repos together.
@@ -36,6 +28,13 @@ for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
3628
git clone "https://github.com/googleapis/$repo.git" --depth=1
3729
pushd "$repo"
3830

31+
# Compile with Java 11 and run the tests with Java 8
32+
mvn clean compile -T 1C
33+
34+
export JAVA_HOME="${JAVA8_HOME}"
35+
export PATH=$JAVA_HOME/bin:$PATH
36+
java -version
37+
3938
# Compile the Handwritten Library with the Protobuf-Java version to test source compatibility
4039
# Run unit tests to help check for any behavior differences (dependant on coverage)
4140
if [ "${repo}" == "google-cloud-java" ]; then

0 commit comments

Comments
 (0)