This plugin adds custom keys to sbt-buildinfo to have more information about the microservice. Settings are typed to improve readability and consistency.
Add this to your project plugins.sbt file
addSbtPlugin("com.github.geirolz" % "sbt-service-info" % "0.0.1")And then enable the plugin to your project in the build.sbt file with
lazy val myProject = (project in file("."))
.enablePlugins(BuildInfoPlugin, ServiceInfoPlugin)serviceBoundedContext= Specify service bounded context info, defaultunknown.serviceProcessingPurpose= Specify service processing purpose, can beOLTPorOLAPdefaultunknown.serviceTags= Specify service useful tags, defaultNilserviceTagsIncludeDependencies= Boolean to specify if automatic add tags related to service dependencies or not, defaulttrue.serviceTagsIncludeDependenciesVersions= WhenserviceTagsIncludeDependenciesis true this flag specify if add dependencies version in the tags or not, defaulttrue
In your build.sbt file where you declare yours buildInfoKeys mind to use ++= instead of :=.
Otherwise, the keys set by this plugin will be overloaded by yours
Example
buildInfoKeys ++= List[BuildInfoKey](
name,
description,
version,
scalaVersion,
sbtVersion,
buildInfoBuildNumber
)