Skip to content

Commit 84798e6

Browse files
committed
<pre>Generated scalatest-mustmatchers module for js.</pre>
1 parent 0e9029c commit 84798e6

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ lazy val scalatestPropSpecJS = ScalatestBuild.scalatestPropSpecJS
6969
lazy val scalatestWordSpecJS = ScalatestBuild.scalatestWordSpecJS
7070
lazy val scalatestDiagramsJS = ScalatestBuild.scalatestDiagramsJS
7171
lazy val scalatestMatchersCoreJS = ScalatestBuild.scalatestMatchersCoreJS
72-
lazy val scalatestShouldMatchersJS = ScalatestBuild.scalatestShouldMatchersJS
72+
lazy val scalatestShouldMatchersJS = ScalatestBuild.scalatestShouldMatchersJS
73+
lazy val scalatestMustMatchersJS = ScalatestBuild.scalatestMustMatchersJS

project/JsBuild.scala

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,39 @@ trait JsBuild { this: BuildCommons =>
780780
"Bundle-Vendor" -> "Artima, Inc.",
781781
"Main-Class" -> "org.scalatest.tools.Runner"
782782
)
783-
).dependsOn(scalacticMacroJS % "compile-internal, test-internal", scalatestMatchersCoreJS).enablePlugins(ScalaJSPlugin)
783+
).dependsOn(scalacticMacroJS % "compile-internal, test-internal", scalatestMatchersCoreJS).enablePlugins(ScalaJSPlugin)
784+
785+
lazy val scalatestMustMatchersJS = Project("scalatestMustMatchersJS", file("modules/js/scalatest-mustmatchers.js"))
786+
.enablePlugins(SbtOsgi)
787+
.settings(sharedSettings: _*)
788+
.settings(
789+
projectTitle := "ScalaTest Must Matchers JS",
790+
organization := "org.scalatest",
791+
name := "scalatest-mustmatchers",
792+
scalacOptions ++= Seq("-P:scalajs:mapSourceURI:" + rootProject.base.toURI + "->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + "/"),
793+
Compile / sourceGenerators += {
794+
Def.task {
795+
GenMatchers.genMainForScalaJS((sourceManaged in Compile).value / "scala" / "org" / "scalatest", version.value, scalaVersion.value)
796+
}
797+
},
798+
scalacOptions ++= (if (scalaBinaryVersion.value == "2.10" || scalaVersion.value.startsWith("2.13")) Seq.empty[String] else Seq("-Ypartial-unification")),
799+
mimaPreviousArtifacts := Set(organization.value %%% moduleName.value % previousReleaseVersion),
800+
mimaCurrentClassfiles := (classDirectory in Compile).value.getParentFile / (moduleName.value + "_" + "sjs0.6_" + scalaBinaryVersion.value + "-" + releaseVersion + ".jar")
801+
).settings(osgiSettings: _*).settings(
802+
OsgiKeys.exportPackage := Seq(
803+
"org.scalatest.matchers.must"
804+
),
805+
OsgiKeys.importPackage := Seq(
806+
"org.scalatest.*",
807+
"*;resolution:=optional"
808+
),
809+
OsgiKeys.additionalHeaders:= Map(
810+
"Bundle-Name" -> "ScalaTest Must Matchers",
811+
"Bundle-Description" -> "ScalaTest.js is an open-source test framework for the Javascript Platform designed to increase your productivity by letting you write fewer lines of test code that more clearly reveal your intent.",
812+
"Bundle-DocURL" -> "http://www.scalatest.org/",
813+
"Bundle-Vendor" -> "Artima, Inc.",
814+
"Main-Class" -> "org.scalatest.tools.Runner"
815+
)
816+
).dependsOn(scalacticMacroJS % "compile-internal, test-internal", scalatestMatchersCoreJS).enablePlugins(ScalaJSPlugin)
784817

785818
}

0 commit comments

Comments
 (0)