Skip to content

Commit 321d761

Browse files
committed
Generated scalatest-mustmatchers module for jvm.
1 parent 38dcbf0 commit 321d761

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ lazy val scalatestRefSpec = ScalatestBuild.scalatestRefSpec
5858
lazy val scalatestWordSpec = ScalatestBuild.scalatestWordSpec
5959
lazy val scalatestDiagrams = ScalatestBuild.scalatestDiagrams
6060
lazy val scalatestMatchersCore = ScalatestBuild.scalatestMatchersCore
61-
lazy val scalatestShouldMatchers = ScalatestBuild.scalatestShouldMatchers
61+
lazy val scalatestShouldMatchers = ScalatestBuild.scalatestShouldMatchers
62+
lazy val scalatestMustMatchers = ScalatestBuild.scalatestMustMatchers

project/scalatest.scala

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,46 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
10371037
"Bundle-DocURL" -> "http://www.scalatest.org/",
10381038
"Bundle-Vendor" -> "Artima, Inc."
10391039
)
1040-
).dependsOn(scalatestMatchersCore)
1040+
).dependsOn(scalatestMatchersCore)
1041+
1042+
lazy val scalatestMustMatchers = Project("scalatestMustMatchers", file("modules/scalatest-mustmatchers"))
1043+
.enablePlugins(SbtOsgi)
1044+
.settings(sharedSettings: _*)
1045+
.settings(scalatestDocSettings: _*)
1046+
.settings(
1047+
projectTitle := "ScalaTest Must Matchers",
1048+
name := "scalatest-mustmatchers",
1049+
organization := "org.scalatest",
1050+
sourceGenerators in Compile += {
1051+
// Little trick to get rid of bnd error when publish.
1052+
Def.task{
1053+
(new File(crossTarget.value, "classes")).mkdirs()
1054+
Seq.empty[File]
1055+
}.taskValue
1056+
},
1057+
sourceGenerators in Compile += {
1058+
Def.task{
1059+
GenMatchers.genMain((sourceManaged in Compile).value / "org" / "scalatest", version.value, scalaVersion.value)
1060+
}.taskValue
1061+
},
1062+
scalatestDocSettings,
1063+
mimaPreviousArtifacts := Set(organization.value %% name.value % previousReleaseVersion),
1064+
mimaCurrentClassfiles := (classDirectory in Compile).value.getParentFile / (name.value + "_" + scalaBinaryVersion.value + "-" + releaseVersion + ".jar")
1065+
).settings(osgiSettings: _*).settings(
1066+
OsgiKeys.exportPackage := Seq(
1067+
"org.scalatest.matchers.must"
1068+
),
1069+
OsgiKeys.importPackage := Seq(
1070+
"org.scalatest.*",
1071+
"*;resolution:=optional"
1072+
),
1073+
OsgiKeys.additionalHeaders:= Map(
1074+
"Bundle-Name" -> "ScalaTest Must Matchers",
1075+
"Bundle-Description" -> "ScalaTest is an open-source test framework for the Java Platform designed to increase your productivity by letting you write fewer lines of test code that more clearly reveal your intent.",
1076+
"Bundle-DocURL" -> "http://www.scalatest.org/",
1077+
"Bundle-Vendor" -> "Artima, Inc."
1078+
)
1079+
).dependsOn(scalatestMatchersCore)
10411080

10421081
def gentestsLibraryDependencies =
10431082
Seq(

0 commit comments

Comments
 (0)