|
1 |
| -organization := "org.scala-lang" |
| 1 | +import sbtcrossproject.{crossProject, CrossType} |
2 | 2 |
|
3 |
| -name := "scala-collection-compat" |
| 3 | +inThisBuild(Def.settings( |
| 4 | + organization := "org.scala-lang", |
| 5 | + version := "0.1-SNAPSHOT", |
| 6 | + resolvers += "scala-pr" at "https://scala-ci.typesafe.com/artifactory/scala-integration/", |
| 7 | + crossScalaVersions := Seq("2.12.5", "2.13.0-pre-b11db01", "2.11.12"), |
| 8 | + scalaVersion := crossScalaVersions.value.head |
| 9 | +)) |
4 | 10 |
|
5 |
| -version := "0.1-SNAPSHOT" |
| 11 | +lazy val `scala-collection-compat` = crossProject(JSPlatform, JVMPlatform) |
| 12 | + .withoutSuffixFor(JVMPlatform) |
| 13 | + .crossType(CrossType.Pure) |
| 14 | + .in(file(".")) |
| 15 | + .settings( |
| 16 | + name := "scala-collection-compat", |
| 17 | + unmanagedSourceDirectories in Compile += { |
| 18 | + val sharedSourceDir = baseDirectory.value.getParentFile / "src/main" |
| 19 | + if (scalaVersion.value.startsWith("2.13.")) sharedSourceDir / "scala-2.13" |
| 20 | + else sharedSourceDir / "scala-2.11_2.12" |
| 21 | + } |
| 22 | + ) |
| 23 | + .jvmSettings( |
| 24 | + libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" |
| 25 | + ) |
| 26 | + .jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)) |
6 | 27 |
|
7 |
| -resolvers += "scala-pr" at "https://scala-ci.typesafe.com/artifactory/scala-integration/" |
8 |
| - |
9 |
| -unmanagedSourceDirectories in Compile += ( |
10 |
| - if(scalaVersion.value.startsWith("2.13.")) (sourceDirectory in Compile).value / "scala-2.13" |
11 |
| - else (sourceDirectory in Compile).value / "scala-2.11_2.12" |
12 |
| -) |
13 |
| - |
14 |
| -crossScalaVersions := Seq("2.12.5", "2.13.0-pre-b11db01", "2.11.12") |
15 |
| - |
16 |
| -scalaVersion := crossScalaVersions.value.head |
17 |
| - |
18 |
| -libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" |
| 28 | +lazy val `scala-collection-compatJVM` = `scala-collection-compat`.jvm |
| 29 | +lazy val `scala-collection-compatJS` = `scala-collection-compat`.js |
0 commit comments