@@ -325,12 +325,15 @@ object ScalatestBuild extends Build {
325
325
publishLocal := {}
326
326
)
327
327
328
+ lazy val deleteJsDependenciesTask = taskKey[Unit ](" Delete JS_DEPENDENCIES" )
329
+
328
330
lazy val scalacticMacroJS = Project (" scalacticMacroJS" , file(" scalactic-macro.js" ))
329
331
.settings(sharedSettings : _* )
330
332
.settings(
331
333
projectTitle := " Scalactic Macro.js" ,
332
334
organization := " org.scalactic" ,
333
335
sourceGenerators in Compile += {
336
+ // We'll delete JS_DEPENDENCIES in scalactic-macro.js
334
337
Def .task{
335
338
GenScalacticJS .genMacroScala((sourceManaged in Compile ).value, version.value, scalaVersion.value) ++
336
339
ScalacticGenResourcesJSVM .genResources((sourceManaged in Compile ).value / " org" / " scalactic" , version.value, scalaVersion.value) ++
@@ -339,7 +342,13 @@ object ScalatestBuild extends Build {
339
342
},
340
343
// Disable publishing macros directly, included in scalactic main jar
341
344
publish := {},
342
- publishLocal := {}
345
+ publishLocal := {},
346
+ deleteJsDependenciesTask <<= (classDirectory in Compile ) map { jsDependenciesFile =>
347
+ (jsDependenciesFile/ " JS_DEPENDENCIES" ).delete()
348
+ ()
349
+ // val loader: ClassLoader = ClasspathUtilities.toLoader(classpath.map(_.data).map(_.getAbsoluteFile))
350
+ // loader.loadClass("your.class.Here").newInstance()
351
+ } triggeredBy(compile in Compile )
343
352
).enablePlugins(ScalaJSPlugin )
344
353
345
354
lazy val scalactic = Project (" scalactic" , file(" scalactic" ))
@@ -403,6 +412,10 @@ object ScalatestBuild extends Build {
403
412
GenScalacticJS .genResource((resourceManaged in Compile ).value, version.value, scalaVersion.value)
404
413
}.taskValue
405
414
},
415
+ // include the macro classes and resources in the main jar
416
+ mappings in (Compile , packageBin) ++= mappings.in(scalacticMacroJS, Compile , packageBin).value,
417
+ // include the macro sources in the main source jar
418
+ mappings in (Compile , packageSrc) ++= mappings.in(scalacticMacroJS, Compile , packageSrc).value,
406
419
mimaPreviousArtifacts := Set (organization.value %%% moduleName.value % previousReleaseVersion),
407
420
mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (moduleName.value + " _" + " sjs0.6_" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
408
421
).settings(osgiSettings : _* ).settings(
@@ -510,7 +523,13 @@ object ScalatestBuild extends Build {
510
523
},
511
524
docTaskSetting,
512
525
mimaPreviousArtifacts := Set (organization.value %% name.value % previousReleaseVersion),
513
- mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (name.value + " _" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
526
+ mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (name.value + " _" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" ),
527
+ mimaBinaryIssueFilters ++= {
528
+ Seq (
529
+ exclude[MissingClassProblem ](" org.scalatest.tools.SbtCommandParser$" ),
530
+ exclude[MissingClassProblem ](" org.scalatest.tools.SbtCommandParser" )
531
+ )
532
+ }
514
533
).settings(osgiSettings : _* ).settings(
515
534
OsgiKeys .exportPackage := Seq (
516
535
" org.scalatest" ,
0 commit comments