@@ -679,6 +679,39 @@ trait JsBuild { this: BuildCommons =>
679
679
" Bundle-Vendor" -> " Artima, Inc." ,
680
680
" Main-Class" -> " org.scalatest.tools.Runner"
681
681
)
682
- ).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin )
682
+ ).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin )
683
+
684
+ lazy val scalatestDiagramsJS = Project (" scalatestDiagramsJS" , file(" modules/js/scalatest-diagrams.js" ))
685
+ .enablePlugins(SbtOsgi )
686
+ .settings(sharedSettings : _* )
687
+ .settings(
688
+ projectTitle := " ScalaTest Diagrams JS" ,
689
+ organization := " org.scalatest" ,
690
+ name := " scalatest-diagrams" ,
691
+ scalacOptions ++= Seq (" -P:scalajs:mapSourceURI:" + rootProject.base.toURI + " ->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + " /" ),
692
+ Compile / sourceGenerators += {
693
+ Def .task {
694
+ GenModulesJS .genScalaTestDiagrams((sourceManaged in Compile ).value / " scala" , version.value, scalaVersion.value)
695
+ }
696
+ },
697
+ scalacOptions ++= (if (scalaBinaryVersion.value == " 2.10" || scalaVersion.value.startsWith(" 2.13" )) Seq .empty[String ] else Seq (" -Ypartial-unification" )),
698
+ mimaPreviousArtifacts := Set (organization.value %%% moduleName.value % previousReleaseVersion),
699
+ mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (moduleName.value + " _" + " sjs0.6_" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
700
+ ).settings(osgiSettings : _* ).settings(
701
+ OsgiKeys .exportPackage := Seq (
702
+ " org.scalatest.diagrams"
703
+ ),
704
+ OsgiKeys .importPackage := Seq (
705
+ " org.scalatest.*" ,
706
+ " *;resolution:=optional"
707
+ ),
708
+ OsgiKeys .additionalHeaders:= Map (
709
+ " Bundle-Name" -> " ScalaTest Diagrams JS" ,
710
+ " 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." ,
711
+ " Bundle-DocURL" -> " http://www.scalatest.org/" ,
712
+ " Bundle-Vendor" -> " Artima, Inc." ,
713
+ " Main-Class" -> " org.scalatest.tools.Runner"
714
+ )
715
+ ).dependsOn(scalacticMacroJS % " compile-internal, test-internal" , scalatestCoreJS).enablePlugins(ScalaJSPlugin )
683
716
684
717
}
0 commit comments