databricks-sdk-java icon indicating copy to clipboard operation
databricks-sdk-java copied to clipboard

Add version class

Open sekaiser opened this issue 1 year ago • 0 comments

Changes

I noticed this issue https://github.com/databricks/databricks-sdk-java/issues/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

sekaiser avatar Sep 14 '23 21:09 sekaiser