Skip to content

deps: update google-java-format to the latest #1003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 24, 2025
Merged
4 changes: 2 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ branchProtectionRules:
- "dependencies (11, java-pubsub)"
- "flatten-plugin-check"
- "build (8, java-bigquery, test)"
- "build (8, java-bigquery, lint)"
- "build (8, java-bigquery, clirr)"
- "build (8, java-bigtable, javadoc)"
- "build (11, java-bigquery, test)"
- "build (11, java-bigquery, lint)"
- "build (11, java-bigquery, clirr)"
- "build (11, java-bigtable, javadoc)"
- "lint (17, java-bigquery, lint)"
- "lint (21, java-bigquery, lint)"
- "javadoc-with-doclet (java-bigtable)"
- "cla/google"
- "graalvm-presubmit-shared-config-a (java-graalvm-ci-prod)"
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/downstream-maven-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- java-bigtable
job-type:
- test # maven-surefire-plugin
- lint # fmt-maven-plugin and google-java-format
- clirr # clirr-maven-plugin
- javadoc # maven-javadoc-plugin
- javadoc-with-doclet # test javadoc generation with doclet
Expand All @@ -34,6 +33,27 @@ jobs:
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [17, 21]
repo:
- java-bigquery
- java-bigtable
job-type:
- lint # fmt-maven-plugin and google-java-format
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
javadoc-with-doclet:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .kokoro/client-library-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ flatten-plugin)
popd
;;
*)
# Here we replace the com.coveo fmt plugin with the spotify version.
# This `sed` won't be needed once downstream repositories update
# `.kokoro/build.sh` to use the `com.spotify.fmt` group ID.
sed -i 's/com.coveo:fmt-maven-plugin/com.spotify.fmt:fmt-maven-plugin/' .kokoro/build.sh
# This reads the JOB_TYPE environmental variable
.kokoro/build.sh
RETURN_CODE=$?
Expand Down
6 changes: 3 additions & 3 deletions .kokoro/presubmit/downstream-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ cp settings.xml "${HOME}/.m2"
git clone "https://github.com/googleapis/sdk-platform-java" --depth=1

# Update the shared-config version in showcase
pushd sdk-platform-java/showcase
pushd sdk-platform-java/java-showcase
modify_shared_config
popd

pushd sdk-platform-java
mvn -B -ntp install --projects '!gapic-generator-java' -Dcheckstyle.skip -Dfmt.skip -DskipTests
popd
pushd sdk-platform-java/showcase/gapic-showcase
pushd sdk-platform-java/java-showcase/gapic-showcase
SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)
popd

Expand All @@ -62,7 +62,7 @@ tar -xf showcase-*
popd

# Run showcase tests with `native` profile
pushd sdk-platform-java/showcase
pushd sdk-platform-java/java-showcase
mvn test -Pnative,-showcase -Denforcer.skip=true -ntp -B
popd

Expand Down
6 changes: 3 additions & 3 deletions java-shared-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<skipITs>true</skipITs>
<auto-value.version>1.11.0</auto-value.version>
<docRoot>/java/docs/reference/</docRoot>
<google-java-format.version>1.7</google-java-format.version>
<google-java-format.version>1.25.2</google-java-format.version>
</properties>

<build>
Expand Down Expand Up @@ -169,9 +169,9 @@
<version>2.8</version>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.25</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand Down
Loading