1
- import com .typesafe .tools .mima .plugin .{MimaPlugin , MimaKeys }
2
-
3
- scalaModuleSettings
4
-
5
- name := " scala-parser-combinators"
6
-
7
- version := " 1.0.5-SNAPSHOT"
1
+ scalaVersion in ThisBuild := crossScalaVersions.value.head
8
2
9
3
crossScalaVersions in ThisBuild := {
10
4
val javaVersion = System .getProperty(" java.version" )
@@ -16,16 +10,45 @@ crossScalaVersions in ThisBuild := {
16
10
Seq (" 2.11.7" , " 2.12.0-M3" )
17
11
}
18
12
19
- // important!! must come here (why?)
20
- scalaModuleOsgiSettings
21
-
22
- OsgiKeys .exportPackage := Seq (s " scala.util.parsing.*;version= ${version.value}" )
23
-
24
- // needed to fix classloader issues (see scala-xml#20)
25
- fork in Test := true
26
-
27
- libraryDependencies += " junit" % " junit" % " 4.11" % " test"
28
-
29
- libraryDependencies += " com.novocode" % " junit-interface" % " 0.10" % " test"
30
-
31
- mimaPreviousVersion := Some (" 1.0.2" )
13
+ lazy val `scala-parser-combinators` = crossProject.in(file(" ." )).
14
+ settings(scalaModuleSettings : _* ).
15
+ settings(
16
+ name := " scala-parser-combinators-root"
17
+ ).
18
+ jvmSettings(
19
+ // Mima uses the name of the jvm project in the artifactId
20
+ // when resolving previous versions (so no "-jvm" project)
21
+ name := " scala-parser-combinators"
22
+ ).
23
+ jsSettings(
24
+ name := " scala-parser-combinators-js"
25
+ ).
26
+ settings(
27
+ moduleName := " scala-parser-combinators" ,
28
+ version := " 1.0.5-SNAPSHOT"
29
+ ).
30
+ jvmSettings(
31
+ // important!! must come here (why?)
32
+ scalaModuleOsgiSettings : _*
33
+ ).
34
+ jvmSettings(
35
+ OsgiKeys .exportPackage := Seq (s " scala.util.parsing.*;version= ${version.value}" ),
36
+
37
+ // needed to fix classloader issues (see scala-xml#20)
38
+ fork in Test := true
39
+ ).
40
+ jsSettings(
41
+ // Scala.js cannot run forked tests
42
+ fork in Test := false
43
+ ).
44
+ jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin )).
45
+ jvmSettings(
46
+ libraryDependencies += " junit" % " junit" % " 4.11" % " test" ,
47
+ libraryDependencies += " com.novocode" % " junit-interface" % " 0.10" % " test"
48
+ ).
49
+ jvmSettings(
50
+ mimaPreviousVersion := Some (" 1.0.4" )
51
+ )
52
+
53
+ lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm
54
+ lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js
0 commit comments