From fc8cbb09495e82adc6d7a855efbad231f69219fd Mon Sep 17 00:00:00 2001 From: bcol-google <134437113+bcol-google@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:48:31 -0400 Subject: [PATCH] deps: Push explicit dependency versioning into the parent pom. Remove explicit versioning to rely on parent or imported BOMs. Remove old lib versions and update explicit lib versions (#1748) * Updated BOMs, Removed versions for deps now managed by BOM. Updated deps not managed by BOM * Push explicit versioning of hamcrest into the parent. Depend on google-cloud-bom in snippets. Remove explicit versioning where possible * fix pomfile header * Fix snippets to leave tags in place. Use the same version tag for all versions in the parent * Fix accidental newlines * Update pom.xml * Add ignore unused deps to proto lib * Fix unused dep in grpc * un-parent google-cloud-pubsublite-bom from google-cloud-pubsublite-parent since it actually is a child of sdk-platform-java-config * Update samples checkstyle check to run on java-version: 11 to fix version mismatch. Same fix applied in https://github.com/googleapis/java-pubsub/pull/2201 * Updated BOMs, Removed versions for deps now managed by BOM. Updated deps not managed by BOM deps: update googleapis/sdk-platform-java action to v2.47.0 (#1738) deps: update dependency com.google.cloud:google-cloud-pubsub to v1.133.1 (#1736) chore: Update generation configuration at Tue Oct 8 02:28:35 UTC 2024 (#1735) * chore: Update generation configuration at Tue Oct 1 02:30:56 UTC 2024 * chore: Update generation configuration at Wed Oct 2 02:26:57 UTC 2024 * chore: Update generation configuration at Thu Oct 3 02:27:16 UTC 2024 * chore: Update generation configuration at Fri Oct 4 02:27:19 UTC 2024 * chore: Update generation configuration at Sat Oct 5 02:25:46 UTC 2024 * chore: Update generation configuration at Sun Oct 6 02:29:14 UTC 2024 * chore: generate libraries at Sun Oct 6 02:29:34 UTC 2024 * chore: Update generation configuration at Tue Oct 8 02:28:35 UTC 2024 chore(main): release 1.14.4-SNAPSHOT (#1733) :robot: I have created a release *beep* *boop* --- --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). chore(deps): update dependency com.google.cloud:google-cloud-pubsublite to v1.14.3 (#1734) deps: update dependency com.google.cloud:sdk-platform-java-config to v3.37.0 (#1740) chore(main): release 1.14.4 (#1741) * chore(main): release 1.14.4 * chore: generate libraries at Tue Oct 8 19:56:23 UTC 2024 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot Push explicit versioning of hamcrest into the parent. Depend on google-cloud-bom in snippets. Remove explicit versioning where possible fix pomfile header Fix snippets to leave tags in place. Use the same version tag for all versions in the parent Fix accidental newlines Update pom.xml Add ignore unused deps to proto lib Fix unused dep in grpc un-parent google-cloud-pubsublite-bom from google-cloud-pubsublite-parent since it actually is a child of sdk-platform-java-config Update samples checkstyle check to run on java-version: 11 to fix version mismatch. Same fix applied in https://github.com/googleapis/java-pubsub/pull/2201 * Use errorprone 2.31.0 since 2.32.0 and 2.33.0 break our java 11 build with compiler errors * Fix samples/pom.xml * fix snapshot and snippets pom.xml * Fix bad merge on pom files --- .github/workflows/samples.yaml | 2 +- google-cloud-pubsublite-bom/pom.xml | 4 +- google-cloud-pubsublite/pom.xml | 9 --- .../internal/ApiExceptionMatcher.java | 1 - .../internal/BufferingPullSubscriberTest.java | 1 - .../internal/CursorClientImplTest.java | 1 - .../internal/TopicStatsClientImplTest.java | 1 - .../internal/wire/CommitStateTest.java | 1 - .../internal/wire/FlowControlBatcherTest.java | 1 - grpc-google-cloud-pubsublite-v1/pom.xml | 15 ++++ pom.xml | 68 +++++++++++-------- proto-google-cloud-pubsublite-v1/pom.xml | 15 ++++ 12 files changed, 74 insertions(+), 45 deletions(-) diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index f1a27f81c..3c00d025e 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v1 with: - java-version: 8 + java-version: 11 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check working-directory: samples diff --git a/google-cloud-pubsublite-bom/pom.xml b/google-cloud-pubsublite-bom/pom.xml index 456bba94c..08109ac4a 100644 --- a/google-cloud-pubsublite-bom/pom.xml +++ b/google-cloud-pubsublite-bom/pom.xml @@ -57,12 +57,12 @@ com.google.api.grpc grpc-google-cloud-pubsublite-v1 - 1.14.4 + 1.14.4 com.google.api.grpc proto-google-cloud-pubsublite-v1 - 1.14.4 + 1.14.4 diff --git a/google-cloud-pubsublite/pom.xml b/google-cloud-pubsublite/pom.xml index a099dbcf6..4e647e1ed 100644 --- a/google-cloud-pubsublite/pom.xml +++ b/google-cloud-pubsublite/pom.xml @@ -38,7 +38,6 @@ com.google.cloud google-cloud-pubsub - 1.133.1 com.google.api.grpc @@ -110,7 +109,6 @@ com.google.flogger flogger-system-backend - 0.8 runtime @@ -120,11 +118,6 @@ truth test - - com.google.truth.extensions - truth-java8-extension - test - org.mockito mockito-core @@ -138,7 +131,6 @@ org.hamcrest hamcrest - 3.0 test @@ -175,7 +167,6 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 enforce diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/ApiExceptionMatcher.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/ApiExceptionMatcher.java index 61f4a2c22..113e015cf 100755 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/ApiExceptionMatcher.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/ApiExceptionMatcher.java @@ -17,7 +17,6 @@ package com.google.cloud.pubsublite.internal; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.junit.Assert.assertThrows; import com.google.api.gax.rpc.StatusCode.Code; diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/BufferingPullSubscriberTest.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/BufferingPullSubscriberTest.java index 6eb24b10f..737706ff5 100644 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/BufferingPullSubscriberTest.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/BufferingPullSubscriberTest.java @@ -17,7 +17,6 @@ package com.google.cloud.pubsublite.internal; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.junit.Assert.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/CursorClientImplTest.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/CursorClientImplTest.java index 423e65bb3..483ffb28c 100644 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/CursorClientImplTest.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/CursorClientImplTest.java @@ -18,7 +18,6 @@ import static com.google.cloud.pubsublite.internal.ApiExceptionMatcher.assertFutureThrowsCode; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/TopicStatsClientImplTest.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/TopicStatsClientImplTest.java index 77c308e76..cf1924dce 100644 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/TopicStatsClientImplTest.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/TopicStatsClientImplTest.java @@ -18,7 +18,6 @@ import static com.google.cloud.pubsublite.internal.ApiExceptionMatcher.assertFutureThrowsCode; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/CommitStateTest.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/CommitStateTest.java index dcdc25858..e7a05a51f 100755 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/CommitStateTest.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/CommitStateTest.java @@ -17,7 +17,6 @@ package com.google.cloud.pubsublite.internal.wire; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static org.junit.Assert.assertThrows; import com.google.api.core.ApiFuture; diff --git a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/FlowControlBatcherTest.java b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/FlowControlBatcherTest.java index 463a8b689..a8d34040e 100644 --- a/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/FlowControlBatcherTest.java +++ b/google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/FlowControlBatcherTest.java @@ -17,7 +17,6 @@ package com.google.cloud.pubsublite.internal.wire; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import com.google.cloud.pubsublite.internal.CheckedApiException; import com.google.cloud.pubsublite.proto.Cursor; diff --git a/grpc-google-cloud-pubsublite-v1/pom.xml b/grpc-google-cloud-pubsublite-v1/pom.xml index 96be90092..e0ca1627e 100644 --- a/grpc-google-cloud-pubsublite-v1/pom.xml +++ b/grpc-google-cloud-pubsublite-v1/pom.xml @@ -44,6 +44,21 @@ proto-google-common-protos + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.flogger:google-extensions + + + + + + true diff --git a/pom.xml b/pom.xml index a00ad09af..1e7d4fb72 100644 --- a/pom.xml +++ b/pom.xml @@ -22,33 +22,28 @@ pom import + + com.google.cloud + google-cloud-bom + 0.230.0 + pom + import + com.google.api.grpc proto-google-cloud-pubsublite-v1 - 1.14.4 + 1.14.4 com.google.api.grpc grpc-google-cloud-pubsublite-v1 - 1.14.4 + 1.14.4 com.google.cloud google-cloud-pubsublite 1.14.4 - - com.google.cloud - google-cloud-bom - 0.228.0 - pom - import - - - com.google.flogger - google-extensions - 0.8 - com.google.auto.service auto-service-annotations @@ -57,13 +52,7 @@ com.google.truth truth - 1.1.5 - test - - - com.google.truth.extensions - truth-java8-extension - 1.1.5 + 1.4.4 test @@ -78,8 +67,37 @@ 4.13.2 test + + com.google.auto.value + auto-value + ${auto-value.version} + + + com.google.auto.service + auto-service + 1.1.1 + + + com.google.errorprone + error_prone_core + + 2.31.0 + + + org.hamcrest + hamcrest + 3.0 + test + + + + com.google.flogger + google-extensions + + @@ -97,7 +115,6 @@ maven-compiler-plugin - 3.13.0 1.8 1.8 @@ -109,12 +126,10 @@ com.google.auto.value auto-value - 1.11.0 com.google.auto.service auto-service - 1.1.1 @@ -147,7 +162,6 @@ google-cloud-pubsublite grpc-google-cloud-pubsublite-v1 proto-google-cloud-pubsublite-v1 - google-cloud-pubsublite-bom @@ -170,7 +184,8 @@ true -XDcompilePolicy=simple - -Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -XepExcludedPaths:.*/pubsublite/proto/.* + -Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -XepExcludedPaths:(.*/pubsublite/proto/.*)|(.*/pubsublite/internal/.*) + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED @@ -186,7 +201,6 @@ com.google.errorprone error_prone_core - 2.13.1 diff --git a/proto-google-cloud-pubsublite-v1/pom.xml b/proto-google-cloud-pubsublite-v1/pom.xml index 7cdcf16ad..c2fd4bbcd 100644 --- a/proto-google-cloud-pubsublite-v1/pom.xml +++ b/proto-google-cloud-pubsublite-v1/pom.xml @@ -31,6 +31,21 @@ api-common + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.flogger:google-extensions + + + + + + true