Skip to content

Commit

Permalink
deps: upgrade google-java-format to 1.13.0 (#1288)
Browse files Browse the repository at this point in the history
* deps: upgrade google-java-format to 1.11.0

Fixes #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
  • Loading branch information
suztomo authored Nov 29, 2021
1 parent 7a7c48f commit fdf20ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions docker/owlbot/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docker/owlbot/java/container_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit fdf20ea

Please sign in to comment.