Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 788 Bytes

version-injector.md

File metadata and controls

21 lines (13 loc) · 788 Bytes

sbt-version-injector

Required by: CoreSettings

Note: This plugin is auto-enabled as part of CoreSettings

SBT plugin that generates resource files for extracting version information.

  • artifact.conf
  • git.conf

The recommended way to access is with the Version class, but you can also access the generated resources directly:

// Replace [org] with the SBT 'organization' key's value
val artifactConf = ConfigFactory.parseURL("/[org]/[name]/artifact.conf")
val gitConf = ConfigFactory.parseURL("/[org]/[name]/git.conf")

val artifactVersion = artifactConf.getString("version")
val gitVersion = gitConf.getString("describe")