@@ -712,6 +712,41 @@ trait JsBuild { this: BuildCommons =>
712
712
" Bundle-Vendor" -> " Artima, Inc." ,
713
713
" Main-Class" -> " org.scalatest.tools.Runner"
714
714
)
715
- ).dependsOn(scalacticMacroJS % " compile-internal, test-internal" , scalatestCoreJS).enablePlugins(ScalaJSPlugin )
715
+ ).dependsOn(scalacticMacroJS % " compile-internal, test-internal" , scalatestCoreJS).enablePlugins(ScalaJSPlugin )
716
+
717
+ lazy val scalatestMatchersCoreJS = Project (" scalatestMatchersCoreJS" , file(" modules/js/scalatest-matchers-core.js" ))
718
+ .enablePlugins(SbtOsgi )
719
+ .settings(sharedSettings : _* )
720
+ .settings(
721
+ projectTitle := " ScalaTest Matchers Core JS" ,
722
+ organization := " org.scalatest" ,
723
+ name := " scalatest-matchers-core" ,
724
+ scalacOptions ++= Seq (" -P:scalajs:mapSourceURI:" + rootProject.base.toURI + " ->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + " /" ),
725
+ Compile / sourceGenerators += {
726
+ Def .task {
727
+ GenModulesJS .genScalaTestMatchersCore((sourceManaged in Compile ).value / " scala" , version.value, scalaVersion.value) ++
728
+ GenFactories .genMainJS((sourceManaged in Compile ).value / " scala" / " org" / " scalatest" / " matchers" , version.value, scalaVersion.value)
729
+ }
730
+ },
731
+ scalacOptions ++= (if (scalaBinaryVersion.value == " 2.10" || scalaVersion.value.startsWith(" 2.13" )) Seq .empty[String ] else Seq (" -Ypartial-unification" )),
732
+ mimaPreviousArtifacts := Set (organization.value %%% moduleName.value % previousReleaseVersion),
733
+ mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (moduleName.value + " _" + " sjs0.6_" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
734
+ ).settings(osgiSettings : _* ).settings(
735
+ OsgiKeys .exportPackage := Seq (
736
+ " org.scalatest.matchers" ,
737
+ " org.scalatest.matchers.dsl"
738
+ ),
739
+ OsgiKeys .importPackage := Seq (
740
+ " org.scalatest.*" ,
741
+ " *;resolution:=optional"
742
+ ),
743
+ OsgiKeys .additionalHeaders:= Map (
744
+ " Bundle-Name" -> " ScalaTest Matchers Core JS" ,
745
+ " 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." ,
746
+ " Bundle-DocURL" -> " http://www.scalatest.org/" ,
747
+ " Bundle-Vendor" -> " Artima, Inc." ,
748
+ " Main-Class" -> " org.scalatest.tools.Runner"
749
+ )
750
+ ).dependsOn(scalacticMacroJS % " compile-internal, test-internal" , scalatestCoreJS).enablePlugins(ScalaJSPlugin )
716
751
717
752
}
0 commit comments