1
- import ScalaModulePlugin ._
2
- import sbtcrossproject .crossProject
1
+ import sbtcrossproject .CrossPlugin .autoImport .crossProject
3
2
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" ,
5
9
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" ).filter(_ => 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 ](" *" ),
9
16
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" ).filter(_ => 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
+ },
18
23
19
24
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}/ " )),
21
26
22
27
scalacOptions in (Compile , doc) ++= Seq (
23
28
" -diagrams" ,
@@ -38,18 +43,18 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
38
43
}
39
44
}
40
45
}
41
- ).
42
- jvmSettings(
46
+ )
47
+ . jvmSettings(
43
48
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(
48
53
// Scala.js cannot run forked tests
49
54
fork in Test := false
50
- ).
51
- jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin )).
52
- nativeSettings(
55
+ )
56
+ . jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin ))
57
+ . nativeSettings(
53
58
skip in compile := System .getProperty(" java.version" ).startsWith(" 1.6" ) || ! scalaVersion.value.startsWith(" 2.11" ),
54
59
test := {},
55
60
libraryDependencies := {
@@ -58,7 +63,3 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
58
63
else libraryDependencies.value
59
64
}
60
65
)
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