Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Latest commit

 

History

History
22 lines (15 loc) · 779 Bytes

version-injector.md

File metadata and controls

22 lines (15 loc) · 779 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")