Skip to content

Commit 790d27a

Browse files
authored
Merge pull request #15 from sjrd/support-scalajs-1.x
Add cross-building support with Scala.js 1.0.0-M1.
2 parents 6c2b2a5 + 9e795c6 commit 790d27a

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
sudo: false
22
language: scala
33
script:
4-
- sbt ++$TRAVIS_SCALA_VERSION root/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuite/scalastyle testSuite/test:scalastyle
4+
- sbt ++$TRAVIS_SCALA_VERSION root/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteJS/scalastyle testSuiteJS/test:scalastyle
55
- sbt ++$TRAVIS_SCALA_VERSION testSuiteJVM/test
6-
- sbt ++$TRAVIS_SCALA_VERSION testSuite/test
7-
- sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSStage in Global := FullOptStage' testSuite/test
6+
- sbt ++$TRAVIS_SCALA_VERSION testSuiteJS/test
7+
- sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSStage in Global := FullOptStage' testSuiteJS/test
88
- sbt ++$TRAVIS_SCALA_VERSION publishLocal
99
scala:
1010
- 2.10.6
11-
- 2.11.8
12-
- 2.12.1
11+
- 2.11.11
12+
- 2.12.2
13+
- 2.13.0-M1
1314
jdk:
1415
- oraclejdk8
16+
env:
17+
- SCALAJS_VERSION=0.6.18
18+
- SCALAJS_VERSION=1.0.0-M1

build.sbt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import sbt.Keys._
2-
import org.scalajs.sbtplugin.cross.CrossProject
3-
4-
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1")
1+
crossScalaVersions in ThisBuild := Seq("2.11.11", "2.10.6", "2.12.2", "2.13.0-M1")
2+
scalaVersion in ThisBuild := (crossScalaVersions in ThisBuild).value.head
53

64
val commonSettings: Seq[Setting[_]] = Seq(
75
version := "0.1.2-SNAPSHOT",
86
organization := "org.scala-js",
9-
scalaVersion := "2.11.8",
107
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
118

129
homepage := Some(url("http://scala-js.org/")),
@@ -59,12 +56,7 @@ lazy val root: Project = project.in(file(".")).
5956
pomIncludeRepository := { _ => false }
6057
)
6158

62-
lazy val testSuite = CrossProject(
63-
jvmId = "testSuiteJVM",
64-
jsId = "testSuite",
65-
base = file("testSuite"),
66-
crossType = CrossType.Full
67-
).
59+
lazy val testSuite = crossProject.
6860
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)).
6961
settings(commonSettings: _*).
7062
settings(

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.13
1+
sbt.version=0.13.15

project/build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.15")
1+
val scalaJSVersion =
2+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.18")
3+
4+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
25

36
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "0.8.0")

0 commit comments

Comments
 (0)