1- import sbtcrossproject .crossProject
1+ import sbtcrossproject .CrossPlugin . autoImport .{ crossProject , CrossType }
22
33crossScalaVersions in ThisBuild := {
44 val allVersions = Seq (" 2.12.6" , " 2.11.12" , " 2.10.7" , " 2.13.0-M3" , " 2.13.0-M4" )
@@ -25,8 +25,14 @@ val commonSettings: Seq[Setting[_]] = Seq(
2525 Some (" scm:git:git@github.com:scala-js/scala-js-java-logging.git" )))
2626)
2727
28- lazy val root : Project = project.in(file(" ." )).
29- enablePlugins(ScalaJSPlugin ).
28+ val nativeSettings = Seq (
29+ scalaVersion := " 2.11.12" ,
30+ crossScalaVersions := Seq (" 2.11.12" )
31+ )
32+
33+ lazy val root = crossProject(JSPlatform , NativePlatform ).
34+ crossType(CrossType .Pure ).
35+ in(file(" ." )).
3036 settings(commonSettings).
3137 settings(
3238 name := " scalajs-java-logging" ,
@@ -64,7 +70,11 @@ lazy val root: Project = project.in(file(".")).
6470 </developers >
6571 ),
6672 pomIncludeRepository := { _ => false }
67- )
73+ ).
74+ nativeSettings(nativeSettings)
75+
76+ lazy val rootJS = root.js
77+ lazy val rootNative = root.native
6878
6979lazy val testSuite = crossProject(JSPlatform , JVMPlatform ).
7080 jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin )).
@@ -76,12 +86,17 @@ lazy val testSuite = crossProject(JSPlatform, JVMPlatform).
7686 jsSettings(
7787 name := " java.logging testSuite on JS"
7888 ).
79- jsConfigure(_.dependsOn(root )).
89+ jsConfigure(_.dependsOn(rootJS )).
8090 jvmSettings(
8191 name := " java.logging testSuite on JVM" ,
8292 libraryDependencies +=
8393 " com.novocode" % " junit-interface" % " 0.9" % " test"
8494 )
8595
86- lazy val testSuiteJS = testSuite.js
87- lazy val testSuiteJVM = testSuite.jvm
96+ lazy val nativeTestSuite = project.
97+ settings(
98+ name := " java.logging testSuite on Native" ,
99+ nativeSettings
100+ ).
101+ dependsOn(rootNative).
102+ enablePlugins(ScalaNativePlugin )
0 commit comments