1- import  ScalaModulePlugin ._ 
2- import  sbtcrossproject .crossProject 
1+ import  sbtcrossproject .CrossPlugin .autoImport .crossProject 
32
4- crossScalaVersions in ThisBuild  :=  List (" 2.12.8" " 2.11.12" " 2.13.0" 
3+ lazy  val  parserCombinators  =  crossProject(JVMPlatform , JSPlatform , NativePlatform )
4+   .withoutSuffixFor(JVMPlatform ).in(file(" ." 
5+   .settings(ScalaModulePlugin .scalaModuleSettings)
6+   .jvmSettings(ScalaModulePlugin .scalaModuleSettingsJVM)
7+   .settings(
8+     name :=  " scala-parser-combinators" 
59
6- lazy  val  root  =  project.in(file(" ." 
7-   .aggregate(`scala-parser-combinatorsJS`, `scala-parser-combinatorsJVM`, `scala-parser-combinatorsNative`)
8-   .settings(disablePublishing)
10+     scalaModuleMimaPreviousVersion :=  Some (" 1.1.0" =>  System .getenv(" SCALAJS_VERSION" !=  " 1.0.0" 
11+     mimaBinaryIssueFilters ++=  {
12+       import  com .typesafe .tools .mima .core ._ 
13+       import  com .typesafe .tools .mima .core .ProblemFilters ._ 
14+       Seq (
15+         exclude[IncompatibleSignatureProblem ](" *" 
916
10- lazy  val  `scala-parser-combinators`  =  crossProject(JSPlatform , JVMPlatform , NativePlatform ).
11-   withoutSuffixFor(JVMPlatform ).in(file(" ." 
12-   settings(scalaModuleSettings : _* ).
13-   jvmSettings(scalaModuleSettingsJVM).
14-   settings(
15-     name :=  " scala-parser-combinators" 
16-     version :=  " 1.1.2-SNAPSHOT" 
17-     mimaPreviousVersion :=  Some (" 1.1.0" =>  System .getenv(" SCALAJS_VERSION" !=  " 1.0.0" 
17+         //  the following 3 are due to https://github.com/lightbend/mima/issues/388
18+         exclude[DirectMissingMethodProblem ](" scala.util.parsing.json.JSON.numberParser" 
19+         exclude[DirectMissingMethodProblem ](" scala.util.parsing.json.JSON.defaultNumberParser" 
20+         exclude[DirectMissingMethodProblem ](" scala.util.parsing.json.JSON.keywordCache" 
21+       )
22+     },
1823
1924    apiMappings +=  (scalaInstance.value.libraryJar -> 
20-          url(s " https://www.scala-lang.org/api/ ${scalaVersion.value}/ " )),
25+       url(s " https://www.scala-lang.org/api/ ${scalaVersion.value}/ " )),
2126
2227    scalacOptions in (Compile , doc) ++=  Seq (
2328      " -diagrams" 
@@ -38,18 +43,18 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
3843        }
3944      }
4045    }
41-   ). 
42-   jvmSettings(
46+   )
47+   . jvmSettings(
4348    OsgiKeys .exportPackage :=  Seq (s " scala.util.parsing.*;version= ${version.value}" ),
44-     libraryDependencies +=  " junit" %  " junit" %  " 4.12 " %  " test " 
45-     libraryDependencies +=  " com.novocode" %  " junit-interface" %  " 0.11" %  " test " 
46-   ). 
47-   jsSettings(
49+     libraryDependencies +=  " junit" %  " junit" %  " 4.13 " %  Test ,
50+     libraryDependencies +=  " com.novocode" %  " junit-interface" %  " 0.11" %  Test 
51+   )
52+   . jsSettings(
4853    //  Scala.js cannot run forked tests
4954    fork in Test  :=  false 
50-   ). 
51-   jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin )). 
52-   nativeSettings(
55+   )
56+   . jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin ))
57+   . nativeSettings(
5358    skip in compile :=  System .getProperty(" java.version" " 1.6" ||  ! scalaVersion.value.startsWith(" 2.11" 
5459    test :=  {},
5560    libraryDependencies :=  {
@@ -58,7 +63,3 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
5863      else  libraryDependencies.value
5964    }
6065  )
61- 
62- lazy  val  `scala-parser-combinatorsJVM`  =  `scala-parser-combinators`.jvm
63- lazy  val  `scala-parser-combinatorsJS`  =  `scala-parser-combinators`.js
64- lazy  val  `scala-parser-combinatorsNative`  =  `scala-parser-combinators`.native
0 commit comments