Skip to content

Commit

Permalink
Merge pull request #14 from dotta/topic/#9-inject-build-version
Browse files Browse the repository at this point in the history
MiMa build version is now injected using ``sbt-buildinfo`` plugin
  • Loading branch information
jsuereth committed Jun 6, 2012
2 parents 07d9aba + 83f06b5 commit 8f76fbc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Expand Up @@ -6,7 +6,7 @@ import com.typesafe.tools.mima.core.ui._
import com.typesafe.tools.mima.core.ui.wizard._
import com.typesafe.tools.mima.core.Config
import com.typesafe.tools.mima.core.ui.event.ExitMiMa
import com.typesafe.tools.mima.core.util.Version
import com.typesafe.tools.mima.core.buildinfo.BuildInfo

import scala.tools.nsc.{ util, io }
import util._
Expand All @@ -19,7 +19,7 @@ abstract class MimaFrame extends MainFrame with Centered {

object TypesafeLogo extends widget.LinkImagePanel(TypesafeSite, images.Icons.typesafe)

title = "Migration Manager - " + Version.version
title = "Migration Manager - " + BuildInfo.version
preferredSize = (1024, 768)
minimumSize = preferredSize
location = center
Expand Down

This file was deleted.

9 changes: 8 additions & 1 deletion project/Build.scala
Expand Up @@ -10,6 +10,7 @@ import sbtassembly.Plugin.AssemblyKeys
import sbtassembly.Plugin.AssemblyKeys._
import sbtassembly.Plugin.assemblySettings
import sbtassembly.Plugin.MergeStrategy
import sbtbuildinfo.Plugin._

object BuildSettings {

Expand Down Expand Up @@ -96,7 +97,13 @@ object MimaBuild extends Build {

lazy val core = (
Project("core", file("core"),
settings = commonSettings)
settings = commonSettings ++: buildInfoSettings ++: Seq(
sourceGenerators in Compile <+= buildInfo,
buildInfoKeys := Seq[Scoped](version),
buildInfoPackage := "com.typesafe.tools.mima.core.buildinfo",
buildInfoObject := "BuildInfo"
)
)
settings(libraryDependencies ++= Seq(compiler, specs2),
name := buildName + "-core")
settings(sonatypePublishSettings:_*)
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
@@ -1,4 +1,6 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.1")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.1.2")

resolvers += Resolver.url("sbt-plugin-releases",
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

0 comments on commit 8f76fbc

Please sign in to comment.