From a341c38613a0068bfec5f67cd0963c4e46b5b4fa Mon Sep 17 00:00:00 2001 From: Igor Bernstein Date: Fri, 16 Oct 2020 18:13:07 -0400 Subject: [PATCH] chore: make version embedding more robust (#451) * chore: make version embedding more robust The previous approach used the jar manifest. Unfortunately that approaches falls apart when the consumer shades the client jar. The new approach uses a combination of releasetool's version tag replacement and maven-resources-plugin to generate a class with an embedded version string. * Simplify by using a file allowlisted in release-tool * Revert "Simplify by using a file allowlisted in release-tool" This reverts commit 22d831cc7dad747f4eb67b7eefd9e36fd437dc73. --- google-cloud-bigtable/pom.xml | 32 +++++++++++++++++++ .../v2/stub/EnhancedBigtableStubSettings.java | 7 ++-- .../com/google/cloud/bigtable/Version.java | 24 ++++++++++++++ .../v2/stub/EnhancedBigtableStubTest.java | 2 +- 4 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 google-cloud-bigtable/src/main/templates/com/google/cloud/bigtable/Version.java diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 24d12d51bf..6ec0532b61 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -15,6 +15,9 @@ 1.16.3-SNAPSHOT + + 1.16.1-SNAPSHOT + google-cloud-bigtable