Skip to content
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

Add version class #155

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

sekaiser
Copy link

Changes

I noticed this issue #123 and thought this might be a good first contribution.

This PR introduces a version class that provides access to the version of the sdk.

Notes

Because I saw the TODO comment, I'd like to point out another approach as well. Apologies if this was already discussed.

You may also use the templating-maven-plugin and a java template in order to generate the version class., e.g.

// path: src/main/java-templates/Version.java

public final class Version {
  public static String sdkVersion() {
    return "${project.version}";
  }

  private Version() {
  }
}

Running the plugin will generate a file in target/generated-sources/java-templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant