feat: recognize x-version-update markers in ClientVersion.java - #317
Closed
igorbernstein2 wants to merge 1 commit into
Closed
feat: recognize x-version-update markers in ClientVersion.java#317igorbernstein2 wants to merge 1 commit into
igorbernstein2 wants to merge 1 commit into
Conversation
It would be very useful to have a way for client developers to embed the project version inside a java class. There are currently 2 approaches that client devs can use: 1. read the jar manifest 2. use resource filtering to inject maven properties into a resource file However both of these have limitations: 1. doesn't work when the client code is shaded into a parent uberjar 2. doesn't work when imported in g3 This new approach solves all of the limitations by allowing client devs to read it directly from a compiled class file which will always be available
Contributor
|
We probably want this in release-please. This is the legacy tool that must be run from the command line |
igorbernstein2
added a commit
to igorbernstein2/java-bigtable
that referenced
this pull request
Apr 9, 2021
Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in googleapis#451
Contributor
|
Closing this in favor of googleapis/release-please#850 |
igorbernstein2
added a commit
to googleapis/java-bigtable
that referenced
this pull request
Apr 13, 2021
* chore: improve embedded version handling Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in #451 * migrate to new version scheme * rename back to Version * config release-please for version bumps * make sure file doesnt get clobbered * add a couple of tests * fmt
kolea2
pushed a commit
to kolea2/java-bigtable
that referenced
this pull request
May 20, 2021
* chore: improve embedded version handling Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in googleapis#451 * migrate to new version scheme * rename back to Version * config release-please for version bumps * make sure file doesnt get clobbered * add a couple of tests * fmt (cherry picked from commit 1af8925)
kolea2
added a commit
to googleapis/java-bigtable
that referenced
this pull request
May 21, 2021
* chore: improve embedded version handling (#715) * chore: improve embedded version handling Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in #451 * migrate to new version scheme * rename back to Version * config release-please for version bumps * make sure file doesnt get clobbered * add a couple of tests * fmt (cherry picked from commit 1af8925) * update version * fix test * fix: add back in extraFiles and fix file path (#833) (cherry picked from commit f914954) * fix test Co-authored-by: Igor Bernstein <igorbernstein@google.com>
benjaminp
pushed a commit
to benjaminp/google-cloud-java
that referenced
this pull request
Jul 13, 2026
* chore: improve embedded version handling Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in googleapis/java-bigtable#451 * migrate to new version scheme * rename back to Version * config release-please for version bumps * make sure file doesnt get clobbered * add a couple of tests * fmt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It would be very useful to have a way for client developers to embed the project version inside a java class.
There are currently 2 approaches that client devs can use:
However both of these have limitations:
This new approach solves all of the limitations by allowing client devs to read it directly from a compiled class file which will always be available