databricks-sdk-java
databricks-sdk-java copied to clipboard
Add version class
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