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"]