1
1
import com .typesafe .tools .mima .plugin .{MimaPlugin , MimaKeys }
2
2
3
- scalaModuleSettings
4
-
5
- name := " scala-xml"
6
-
7
- version := " 1.0.6-SNAPSHOT"
8
-
9
- scalaVersion := crossScalaVersions.value.head
10
-
11
- crossScalaVersions := {
3
+ scalaVersion in ThisBuild := crossScalaVersions.value.head
4
+ crossScalaVersions in ThisBuild := {
12
5
val java = System .getProperty(" java.version" )
13
6
if (java.startsWith(" 1.6." ) || java.startsWith(" 1.7." ))
14
7
Seq (" 2.11.8" )
@@ -18,22 +11,26 @@ crossScalaVersions := {
18
11
sys.error(s " don't know what Scala versions to build on $java" )
19
12
}
20
13
21
- // reenable -Xfatal-warnings?
22
- scalacOptions ++= " -deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_" .split(" \\ s+" ).to[Seq ]
23
-
24
- scalacOptions in Test += " -Xxml:coalescing"
25
-
26
- // important!! must come here (why?)
27
- scalaModuleOsgiSettings
28
-
29
- OsgiKeys .exportPackage := Seq (s " scala.xml.*;version= ${version.value}" )
30
-
31
- libraryDependencies += " junit" % " junit" % " 4.11" % " test"
32
-
33
- libraryDependencies += " com.novocode" % " junit-interface" % " 0.10" % " test"
34
-
35
- // // testing:
36
- // used in CompilerErrors test
37
- libraryDependencies += (" org.scala-lang" % " scala-compiler" % scalaVersion.value % " test" ).exclude(" org.scala-lang.modules" , s " scala-xml* " )
38
-
39
- mimaPreviousVersion := Some (" 1.0.5" )
14
+ lazy val root = project.in(file(" ." ))
15
+ .aggregate(xmlJS, xmlJVM)
16
+
17
+ lazy val xml = crossProject
18
+ .crossType(CrossType .Full )
19
+ .settings(
20
+ name := " scala-xml" ,
21
+ version := " 1.0.6-SNAPSHOT" ,
22
+ scalacOptions ++= " -deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_" .split(" \\ s+" ).to[Seq ],
23
+ scalacOptions in Test += " -Xxml:coalescing" )
24
+ .jvmSettings(
25
+ scalaModuleSettings ++
26
+ scalaModuleOsgiSettings ++
27
+ List (
28
+ OsgiKeys .exportPackage := Seq (s " scala.xml.*;version= ${version.value}" ),
29
+ libraryDependencies += " junit" % " junit" % " 4.11" % " test" ,
30
+ libraryDependencies += " com.novocode" % " junit-interface" % " 0.10" % " test" ,
31
+ libraryDependencies += (" org.scala-lang" % " scala-compiler" % scalaVersion.value % " test" ).exclude(" org.scala-lang.modules" , s " scala-xml* " ),
32
+ mimaPreviousVersion := Some (" 1.0.5" )): _* )
33
+ .jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin ))
34
+
35
+ lazy val xmlJVM = xml.jvm
36
+ lazy val xmlJS = xml.js
0 commit comments