@@ -646,6 +646,39 @@ trait JsBuild { this: BuildCommons =>
646
646
" Bundle-Vendor" -> " Artima, Inc." ,
647
647
" Main-Class" -> " org.scalatest.tools.Runner"
648
648
)
649
- ).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin )
649
+ ).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin )
650
+
651
+ lazy val scalatestWordSpecJS = Project (" scalatestWordSpecJS" , file(" modules/js/scalatest-wordspec.js" ))
652
+ .enablePlugins(SbtOsgi )
653
+ .settings(sharedSettings : _* )
654
+ .settings(
655
+ projectTitle := " ScalaTest WordSpec JS" ,
656
+ organization := " org.scalatest" ,
657
+ name := " scalatest-wordspec" ,
658
+ scalacOptions ++= Seq (" -P:scalajs:mapSourceURI:" + rootProject.base.toURI + " ->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + " /" ),
659
+ Compile / sourceGenerators += {
660
+ Def .task {
661
+ GenModulesJS .genScalaTestWordSpec((sourceManaged in Compile ).value / " scala" , version.value, scalaVersion.value)
662
+ }
663
+ },
664
+ scalacOptions ++= (if (scalaBinaryVersion.value == " 2.10" || scalaVersion.value.startsWith(" 2.13" )) Seq .empty[String ] else Seq (" -Ypartial-unification" )),
665
+ mimaPreviousArtifacts := Set (organization.value %%% moduleName.value % previousReleaseVersion),
666
+ mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (moduleName.value + " _" + " sjs0.6_" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
667
+ ).settings(osgiSettings : _* ).settings(
668
+ OsgiKeys .exportPackage := Seq (
669
+ " org.scalatest.wordspec"
670
+ ),
671
+ OsgiKeys .importPackage := Seq (
672
+ " org.scalatest.*" ,
673
+ " *;resolution:=optional"
674
+ ),
675
+ OsgiKeys .additionalHeaders:= Map (
676
+ " Bundle-Name" -> " ScalaTest WordSpec JS" ,
677
+ " 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." ,
678
+ " Bundle-DocURL" -> " http://www.scalatest.org/" ,
679
+ " Bundle-Vendor" -> " Artima, Inc." ,
680
+ " Main-Class" -> " org.scalatest.tools.Runner"
681
+ )
682
+ ).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin )
650
683
651
684
}
0 commit comments