From fdf20eac32611b0917be55b759a3e7e54caf5cbd Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 29 Nov 2021 12:53:56 -0500 Subject: [PATCH] deps: upgrade google-java-format to 1.13.0 (#1288) * deps: upgrade google-java-format to 1.11.0 Fixes https://github.com/googleapis/synthtool/issues/1287 google-java-format 1.11.0 is the version used by fmt-maven-plugin 2.12 (latest as of November 2021). * ci: owlbot to use Java 11 * formatter version through the java-shared-config * updating container_test.yaml --- docker/owlbot/java/Dockerfile | 7 +++++-- docker/owlbot/java/container_test.yaml | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docker/owlbot/java/Dockerfile b/docker/owlbot/java/Dockerfile index bfdf11499..ecfa58c22 100644 --- a/docker/owlbot/java/Dockerfile +++ b/docker/owlbot/java/Dockerfile @@ -13,9 +13,12 @@ # limitations under the License. # build from the root of this repo: -FROM gcr.io/cloud-devrel-public-resources/java8 +FROM gcr.io/cloud-devrel-public-resources/java11 -ARG JAVA_FORMAT_VERSION=1.7 +# The formatter version used by the fmt-maven-plugin through the +# google-cloud-shared-config. +# https://github.com/googleapis/java-shared-config/blob/main/pom.xml#L228 +ARG JAVA_FORMAT_VERSION=1.13.0 RUN apt-get install -y --no-install-recommends jq diff --git a/docker/owlbot/java/container_test.yaml b/docker/owlbot/java/container_test.yaml index 006acb24a..d7988dcf8 100644 --- a/docker/owlbot/java/container_test.yaml +++ b/docker/owlbot/java/container_test.yaml @@ -17,10 +17,10 @@ commandTests: - name: "version" command: ["java", "-version"] # java -version outputs to stderr... - expectedError: ["(java|openjdk) version \"1.8.*\""] + expectedError: ["(java|openjdk) version \"11.*\""] - name: "formatter" command: ["java", "-jar", "/owlbot/google-java-format.jar", "--version"] - expectedError: ["google-java-format: Version 1.7"] + expectedError: ["google-java-format: Version 1.13.0"] - name: "python" command: ["python", "--version"] expectedOutput: ["Python 3.6.1"]