Created
May 16, 2012 22:38
-
-
Save eed3si9n/2714592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sbt._ | |
| import Keys._ | |
| import PlayProject._ | |
| import sbtbuildinfo.Plugin._ | |
| object ApplicationBuild extends Build { | |
| val appName = "play-sbt-buildinfo-sample" | |
| val appVersion = "1.0-SNAPSHOT" | |
| val appDependencies = Seq( | |
| // Add your project dependencies here, | |
| ) | |
| val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA, | |
| settings = Defaults.defaultSettings ++ buildInfoSettings | |
| ).settings( | |
| sourceGenerators in Compile <+= buildInfo, | |
| buildInfoKeys := Seq[Scoped](name, version, scalaVersion, sbtVersion), | |
| buildInfoPackage := "hello" | |
| ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @(message: String) | |
| @("Welcome to %s %s" format (hello.BuildInfo.name, hello.BuildInfo.version)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Comment to get more information during initialization | |
| logLevel := Level.Warn | |
| // The Typesafe repository | |
| resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | |
| // Use the Play sbt plugin for Play projects | |
| addSbtPlugin("play" % "sbt-plugin" % "2.0.1") | |
| resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns) | |
| addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.1.1") |
Figured it out. For 0.2.0 of the sbt-buildinfo plugin
buildInfoKeys := Seq[Scoped](name, version, scalaVersion, sbtVersion),
must be switched to
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
as noted on the github sbt-buildinfo git page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this still valid for sbt-buildinfo 0.2.0. Having issues.