From 1ac679982480a4951fec51ec94c8211cb04d3c89 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Tue, 4 Oct 2016 15:01:40 -0500 Subject: [PATCH 1/4] disable Specs2 stuff, for 2.12 community build in the 2.12 community build we want to only include/support specs2 3.x going forward, but the specs2 stuff here is specs2 2.x the build is set up in a weird way where it isn't enough to exclude the specs2 project in the dbuild config, like we'd normally expect, because the specs2 dependency and the specs2-referencing source files are included in the main project as well for some reason -- it seems wrong to me --- project/Build.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 0e984cb6..e1eb22d6 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -112,8 +112,8 @@ object ScalaMockBuild extends Build { compile in Compile := Analysis.Empty, publishArtifact in (Compile, packageBin) := false, publishArtifact in (Compile, packageSrc) := false, - sources in Compile <<= (Seq(core, scalatestSupport, specs2Support).map(sources in Compile in _).join).map(_.flatten), - libraryDependencies ++= Seq(reflect, scalatest, specs2) + sources in Compile <<= (Seq(core, scalatestSupport).map(sources in Compile in _).join).map(_.flatten), + libraryDependencies ++= Seq(reflect, scalatest) )) aggregate(core, core_tests, scalatestSupport, specs2Support, examples) lazy val core = Project( From 7585932cdde983b77e9f6a8dc5855da73a366d1c Mon Sep 17 00:00:00 2001 From: barkhorn Date: Thu, 3 Nov 2016 22:42:56 +0000 Subject: [PATCH 2/4] build with scala 2.12 --- .../src/main/scala/org/scalamock/specs2/MockFactory.scala | 4 +--- project/Build.scala | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frameworks/specs2/src/main/scala/org/scalamock/specs2/MockFactory.scala b/frameworks/specs2/src/main/scala/org/scalamock/specs2/MockFactory.scala index 660bdc63..d4913b83 100644 --- a/frameworks/specs2/src/main/scala/org/scalamock/specs2/MockFactory.scala +++ b/frameworks/specs2/src/main/scala/org/scalamock/specs2/MockFactory.scala @@ -22,9 +22,7 @@ package org.scalamock.specs2 import org.specs2.execute.{ AsResult, Failure, FailureException, Result } import org.specs2.main.ArgumentsShortcuts -import org.specs2.specification.{ AroundExample, Fragments, SpecificationStructure } -import org.specs2.specification.Fragment -import org.specs2.mutable.FragmentsBuilder +import org.specs2.specification._ import org.specs2.mutable.Around import org.scalamock.MockFactoryBase diff --git a/project/Build.scala b/project/Build.scala index e1eb22d6..52ef77a2 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -23,8 +23,8 @@ import Keys._ import sbt.inc.Analysis object BuildSettings { - val buildVersion = "3.3.0" - val buildScalaVersion = "2.11.8" + val buildVersion = "3.4.0" + val buildScalaVersion = "2.12.0" val buildSettings = Defaults.coreDefaultSettings ++ Seq( organization := "org.scalamock", @@ -93,12 +93,12 @@ object ShellPrompt { object Dependencies { val scalatest = "org.scalatest" %% "scalatest" % "3.0.0" - val specs2 = "org.specs2" %% "specs2" % "2.4.16" + val specs2 = "org.specs2" %% "specs2-core" % "3.8.6" val reflect = "org.scala-lang" % "scala-reflect" % BuildSettings.buildScalaVersion // Specs2 and ScalaTest use different scala-xml versions // and this caused problems with referencing class org.scalatest.events.Event - val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.3" % "test" + val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.6" % "test" } object ScalaMockBuild extends Build { From 6a8ac7ef38434cfe6737e911f45a982f6bec6637 Mon Sep 17 00:00:00 2001 From: barkhorn Date: Thu, 3 Nov 2016 22:55:18 +0000 Subject: [PATCH 3/4] travis should also build with 2.12 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1e7e26b1..fcee9eda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ language: scala scala: - - "2.11.1" \ No newline at end of file + - "2.11.8" + - "2.12.0" + From 72b2719f0645c499d3b3f69f85ad542c5d4ad0f3 Mon Sep 17 00:00:00 2001 From: barkhorn Date: Fri, 4 Nov 2016 06:25:00 +0000 Subject: [PATCH 4/4] exclude jdk7 builds on scala 2.12 --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index fcee9eda..35103de4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,15 @@ language: scala + scala: - "2.11.8" - "2.12.0" +jdk: + - oraclejdk8 + - oraclejdk7 + +matrix: + exclude: + - scala: "2.12.0" + jdk: oraclejdk7 +