Permalink
Browse files

Upgrade to build sbt 0.12.0 and 2.10.0-M7

  • Loading branch information...
1 parent 812f374 commit aedb80ce6700069ea08db4624e99e17050a3f2e4 @mdr mdr committed Oct 3, 2012
View
@@ -1,6 +1,7 @@
0.1.3 (..)
* Add EOF to ComplilationUnit, ensuring entire source is represented in the tree
* Support $this references in String interpolation
+* Update build to sbt 0.12.0
0.1.2 (7/May/12)
View
@@ -9,11 +9,16 @@ import scalariform.formatter.preferences._
object ScalariformBuild extends Build {
+
lazy val commonSettings = Defaults.defaultSettings ++ ScalariformPlugin.defaultScalariformSettings ++ Seq(
organization := "org.scalariform",
version := "0.1.3-SNAPSHOT",
scalaVersion := "2.9.2",
- crossScalaVersions := Seq("2.8.0", "2.8.1", "2.8.2", "2.9.0", "2.9.1", "2.9.2"),
+ crossScalaVersions := Seq(
+ "2.10.0-M7",
+ "2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0",
+ "2.8.2", "2.8.1", "2.8.0"
+ ),
exportJars := true, // Needed for cli oneJar
retrieveManaged := true,
scalacOptions += "-deprecation",
@@ -32,7 +37,7 @@ object ScalariformBuild extends Build {
def getScalaTestDependency(scalaVersion: String) = scalaVersion match {
case "2.8.0" "org.scalatest" %% "scalatest" % "1.3.1.RC2" % "test"
- case "2.10.0-M3" "org.scalatest" % "scalatest_2.10.0-M3" % "1.8-SNAPSHOT" % "test"
+ case "2.10.0-M7" "org.scalatest" % "scalatest_2.10.0-M7" % "1.9-2.10.0-M7-B1" % "test"
case _ "org.scalatest" %% "scalatest" % "1.7.2" % "test"
}
@@ -44,7 +49,7 @@ object ScalariformBuild extends Build {
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ false },
- sbtbuildinfo.Plugin.buildInfoKeys := Seq[Scoped](version),
+ sbtbuildinfo.Plugin.buildInfoKeys := Seq[sbtbuildinfo.Plugin.BuildInfoKey](version),
sbtbuildinfo.Plugin.buildInfoPackage := "scalariform",
sourceGenerators in Compile <+= sbtbuildinfo.Plugin.buildInfo,
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Managed,
@@ -58,7 +63,7 @@ object ScalariformBuild extends Build {
Seq(
libraryDependencies += "commons-io" % "commons-io" % "1.4",
mainClass in (Compile, packageBin) := Some("scalariform.commandline.Main"),
- artifactName in SbtOneJar.oneJar := { (config: String, module: ModuleID, artifact: Artifact) "scalariform.jar" },
+ artifactName in SbtOneJar.oneJar := { (version: ScalaVersion, module: ModuleID, artifact: Artifact) "scalariform.jar" },
publish := (),
publishLocal := ())) dependsOn (scalariform)
View
@@ -1 +1 @@
-sbt.version=0.11.2
+sbt.version=0.12.0
View
@@ -1,23 +1,18 @@
resolvers += Classpaths.typesafeResolver
-resolvers += Resolver.url(
- "sbt-plugin-releases",
- new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/")
-)(Resolver.ivyStylePatterns)
-
-addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.7")
+addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.8")
resolvers += Classpaths.typesafeSnapshots
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-SNAPSHOT")
-addSbtPlugin("com.typesafe.sbtscalariform" % "sbtscalariform" % "0.3.0")
+addSbtPlugin("com.typesafe.sbtscalariform" % "sbtscalariform" % "0.5.1")
-resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
+// resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
-addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.1.1")
+addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.0")
retrieveManaged := true
@@ -20,7 +20,7 @@ abstract class AbstractFormatterTest extends FlatSpec with ShouldMatchers with S
implicit def string2FormatTest(s: String)(implicit formattingPreferences: IFormattingPreferences = FormattingPreferences(), scalaVersion: String = ScalaVersions.DEFAULT_VERSION): FormatTest =
FormatTest(s.stripMargin, formattingPreferences, scalaVersion)
- override def newTestFailedException(message: String) = new TestFailedException(message = Some(message), cause = None, failedCodeStackDepth = 2)
+ def testFailedException(message: String) = new TestFailedException(message = Some(message), cause = None, failedCodeStackDepth = 2)
case class FormatTest(source: String, formattingPreferences: IFormattingPreferences, scalaVersion: String) {
@@ -32,20 +32,20 @@ abstract class AbstractFormatterTest extends FlatSpec with ShouldMatchers with S
val actual = format(source, scalaVersion = scalaVersion)(formattingPreferences)
if (debug) println("Actual = " + actual)
if (expected != actual)
- throw newTestFailedException("Format failure:\n ---- Expected ---- \n" + prettyPrint(expected) + "<<<\n ---- but was----- \n" + prettyPrint(actual) + "<<<\n ---- Original: ----- \n" + prettyPrint(source) + "<<<.")
+ throw testFailedException("Format failure:\n ---- Expected ---- \n" + prettyPrint(expected) + "<<<\n ---- but was----- \n" + prettyPrint(actual) + "<<<\n ---- Original: ----- \n" + prettyPrint(source) + "<<<.")
val beforeTokens = ScalaLexer.tokenise(source, scalaVersion = scalaVersion)
val afterTokens = ScalaLexer.tokenise(actual, scalaVersion = scalaVersion)
val newlineTokenTypes = Set(Tokens.NEWLINE, Tokens.NEWLINES)
if (beforeTokens.map(_.tokenType).find(!newlineTokenTypes.contains(_)) != afterTokens.map(_.tokenType).find(!newlineTokenTypes.contains(_)))
- throw newTestFailedException("Text as expected, but actual and expected tokens differ:\n ---- Before ---- \n" + beforeTokens + "\n ---- After ---- \n" + afterTokens + "\n")
+ throw testFailedException("Text as expected, but actual and expected tokens differ:\n ---- Before ---- \n" + beforeTokens + "\n ---- After ---- \n" + afterTokens + "\n")
val actual2 = format(actual, scalaVersion = scalaVersion)(formattingPreferences)
if (actual2 != actual) {
- throw newTestFailedException("Idempotency failure:\n ---- Expected ---- \n" + prettyPrint(actual) + "<<<\n ---- but was----- \n" + prettyPrint(actual2) + "<<<.")
+ throw testFailedException("Idempotency failure:\n ---- Expected ---- \n" + prettyPrint(actual) + "<<<\n ---- but was----- \n" + prettyPrint(actual2) + "<<<.")
}
val afterTokens2 = ScalaLexer.tokenise(actual2, scalaVersion = scalaVersion)
if (afterTokens2.map(_.tokenType) != afterTokens.map(_.tokenType)) {
- throw newTestFailedException("Idempotency token inconsistency:\n ---- One ---- \n" + afterTokens2 + "\n ---- Twice ---- \n" + afterTokens2 + "\n")
+ throw testFailedException("Idempotency token inconsistency:\n ---- One ---- \n" + afterTokens2 + "\n ---- Twice ---- \n" + afterTokens2 + "\n")
}
}
}

0 comments on commit aedb80c

Please sign in to comment.