Skip to content

Commit 5f48d24

Browse files
authored
Merge pull request scala-js#32 from sjrd/support-scalajs-1.x
Add cross-building support with Scala.js 1.0.0-M1.
2 parents f20674d + dbdb924 commit 5f48d24

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
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 scalaJSUseRhino in Global := false' testSuite/test
8-
- sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSUseRhino in Global := false' '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
98
- sbt ++$TRAVIS_SCALA_VERSION publishLocal
109
scala:
1110
- 2.10.6
@@ -14,3 +13,6 @@ scala:
1413
- 2.13.0-M1
1514
jdk:
1615
- oraclejdk8
16+
env:
17+
- SCALAJS_VERSION=0.6.18
18+
- SCALAJS_VERSION=1.0.0-M1

build.sbt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import sbt.Keys._
2-
import org.scalajs.sbtplugin.cross.CrossProject
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
33

44
val commonSettings: Seq[Setting[_]] = Seq(
55
version := "0.2.2-SNAPSHOT",
66
organization := "org.scala-js",
7-
scalaVersion := "2.11.8",
87
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
98

109
homepage := Some(url(http://github.com/%3Cspan%20class=%22pl-s%22%3E%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3Ehttp://scala-js.org/%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3E%3C/span%3E)),
@@ -57,12 +56,7 @@ lazy val root: Project = project.in(file(".")).
5756
pomIncludeRepository := { _ => false }
5857
)
5958

60-
lazy val testSuite = CrossProject(
61-
jvmId = "testSuiteJVM",
62-
jsId = "testSuite",
63-
base = file("testSuite"),
64-
crossType = CrossType.Full
65-
).
59+
lazy val testSuite = crossProject.
6660
jsConfigure(_ .enablePlugins(ScalaJSJUnitPlugin)).
6761
settings(commonSettings: _*).
6862
settings(

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.16")
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)