Skip to content

Commit

Permalink
Merge pull request #17 from xuwei-k/scala-native
Browse files Browse the repository at this point in the history
support scala-native
  • Loading branch information
thesamet authored Jan 12, 2018
2 parents 83af92e + 43ad614 commit 7abdc94
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ matrix:
jdk: oraclejdk8
- scala: 2.13.0-M2
jdk: oraclejdk8
- jdk: oraclejdk8
sudo: required
env: SCALA_NATIVE
before_install:
- curl https://raw.githubusercontent.com/scala-native/scala-native/9069e8d447f7a9/bin/travis_setup.sh | bash -x
script:
- sbt lensesNative/compile "show lensesNative/nativeMissingDependencies"
12 changes: 8 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import ReleaseTransformations._
import sbtcrossproject.CrossPlugin.autoImport.crossProject

scalaVersion := "2.11.11"
val Scala211 = "2.11.12"

crossScalaVersions := Seq("2.11.11", "2.10.6", "2.12.2", "2.13.0-M2")
scalaVersion in ThisBuild := Scala211

crossScalaVersions := Seq(Scala211, "2.10.6", "2.12.2", "2.13.0-M2")

organization in ThisBuild := "com.thesamet.scalapb"

Expand All @@ -25,6 +28,7 @@ releaseProcess := Seq[ReleaseStep](
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining(s";++${Scala211};lensesNative/publishSigned"),
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
Expand All @@ -40,7 +44,7 @@ lazy val root = project.in(file("."))
publishArtifact := false
)

lazy val lenses = crossProject.in(file("."))
lazy val lenses = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("."))
.settings(
name := "lenses"
)
Expand All @@ -60,4 +64,4 @@ lazy val lenses = crossProject.in(file("."))

lazy val lensesJVM = lenses.jvm
lazy val lensesJS = lenses.js

lazy val lensesNative = lenses.native
1 change: 1 addition & 0 deletions project/native.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.6")
2 changes: 1 addition & 1 deletion project/release.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")

2 changes: 1 addition & 1 deletion project/scalajs.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.18")

addSbtPlugin("org.scala-native" % "sbt-scalajs-crossproject" % "0.2.2")

0 comments on commit 7abdc94

Please sign in to comment.