Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepared 0.1.4 release #25

Merged
merged 2 commits into from
Nov 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ MiMa is split into Several modules:
SBT Plugin
----------

The SBT Plugin is released for SBT version 0.11.3. To try it, do the following:
The SBT Plugin is released for SBT version 0.12. To try it, do the following:

1. Add the following to your `project/project/build.scala` file:

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

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.4")
```

2. Add the following to your `build.sbt` file:
Expand Down Expand Up @@ -70,7 +70,7 @@ Setting up [sbteclipse][sbteclipse] is a simple three-steps process:
* Create a ``eclipse.sbt`` file under the ``project`` folder and add the [sbteclipse][sbteclipse] plugin.
At the time of this writing, my ``project/eclipse.sbt`` contains the following:

``addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-RC1")``
``addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")``

* Create a ``eclipse.sbt`` file under the ``core`` folder and add:

Expand Down
27 changes: 13 additions & 14 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ object BuildSettings {

val buildName = "mima"
val buildOrganization = "com.typesafe"
val buildScalaVer = "2.9.1"
val buildVersion = "0.1.4-SNAPSHOT"


val buildScalaVer = "2.9.2"
val buildVersion = "0.1.4"

val commonSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization,
scalaVersion := buildScalaVer,
Expand Down Expand Up @@ -77,7 +78,7 @@ object Dependencies {
val compiler = "org.scala-lang" % "scala-compiler" % buildScalaVer
val swing = "org.scala-lang" % "scala-swing" % buildScalaVer

val specs2 = "org.specs2" %% "specs2" % "1.5" % "test"
val specs2 = "org.specs2" % "specs2_2.9.1" % "1.5" % "test"
}

object MimaBuild extends Build {
Expand Down Expand Up @@ -195,8 +196,8 @@ object MimaBuild extends Build {
lazy val functionalTests = TaskKey[Unit]("test-functional")

// define configurations for the v1 and v2 sources
lazy val v1Config = config("v1")
lazy val v2Config = config("v2")
lazy val v1Config = config("v1") extend Compile
lazy val v2Config = config("v2") extend Compile

// these are settings defined for each configuration (v1 and v2).
// We use the normal per-configuration settings, but modify the source directory to be just v1/ instead of src/v1/scala/
Expand All @@ -223,17 +224,15 @@ object MimaBuild extends Build {
val loader = new java.net.URLClassLoader(urls, si.loader)

val testClass = loader.loadClass("com.typesafe.tools.mima.lib.CollectProblemsTest")
val testRunner = testClass.newInstance().asInstanceOf[
{ def runTest(testClasspath: List[String], testName: String, oldJarPath: String, newJarPath: String,
oraclePath: String): Unit
}]
val testRunner = testClass.newInstance().asInstanceOf[{
def runTest(testClasspath: Array[String], testName: String, oldJarPath: String, newJarPath: String, oraclePath: String): Unit
}]

// Add the scala-library to the MiMa classpath used to run this test
val testClasspath = data(cp).filter(_.getName endsWith "scala-library.jar").map(_.getAbsolutePath).toList
val testClasspath = data(cp).filter(_.getName endsWith "scala-library.jar").map(_.getAbsolutePath).toArray

val projectPath = proj.build.getPath + "reporter" + "/" + "functional-tests" + "/" + "src" + "/" + "test" + "/" + proj.project

val projectPath = proj.build.getPath + "reporter" + "/" + "functional-tests" + "/" + "src" +
"/" + "test" + "/" + proj.project

val oraclePath = projectPath + "/problems.txt"

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ case class TestFailed(msg: String) extends Exception(msg)

class CollectProblemsTest {

def runTest(testClasspath: List[String])(testName: String, oldJarPath: String, newJarPath: String, oraclePath: String) {
def runTest(testClasspath: Array[String])(testName: String, oldJarPath: String, newJarPath: String, oraclePath: String) {
// load test setup
Config.setup("scala com.typesafe.tools.mima.MiMaLibUI <old-dir> <new-dir>", Array(oldJarPath, newJarPath))
val cp = testClasspath ::: ClassPath.split(Config.baseClassPath.asClasspathString)
val cp = testClasspath ++ ClassPath.split(Config.baseClassPath.asClasspathString)
val cpString = ClassPath.join(cp: _*)
Config.baseClassPath = new JavaClassPath(ClassPath.DefaultJavaContext.classesInPath(cpString).toIndexedSeq, ClassPath.DefaultJavaContext)

Expand Down