Questions tagged [sbt-buildinfo]

sbt plugin to generate Scala source from your build definitions.

Usage

Add the following in your build.sbt:

buildInfoSettings

sourceGenerators in Compile <+= buildInfo

buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)

buildInfoPackage := "hello"

This generates the following:

package hello

case object BuildInfo {
  val name = "helloworld"
  val version = "0.1-SNAPSHOT"
  val scalaVersion = "2.9.2"
  val sbtVersion = "0.12.0"
}
18 questions
0
votes
1 answer

Set current project in sbt - spark build issue

I am getting the error Set current project to spark-parent (in build file:/C:/cygwin64/spark-current/spark-2.1.1/) while trying to build spark. Is there an option "-Dcurrent" or some sbt switch that I can set to facilitate this or do I need to…
uh_big_mike_boi
  • 3,350
  • 4
  • 33
  • 64
0
votes
0 answers

SBT: Access generated classes in Build.scala

I am facing an issue with SBT managed sources. I want to import some automatically generated classes (like BuildInfo.scala) from src_managed to my Build.scala SBT file. Although all classes will be generated successfully, I can not import them in…
codejitsu
  • 3,162
  • 2
  • 24
  • 38
0
votes
1 answer

How to get Eclipse to resolve BuildInfo in an sbt / Scala/ BuildInfo project

Some Scala / SBT projects such as Tugboat or giter8 use BuildInfo - for example see here and here. When I import these projects into Eclipse after creating project files using sbteclipse the project will not compile as it cannot resolve BuildInfo.…
Mark Butler
  • 4,361
  • 2
  • 39
  • 39
1
2