diff options
author | Jon Pretty <jon.pretty@propensive.com> | 2018-03-09 11:42:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 11:42:07 +0000 |
commit | fb514c8045df9eb36064aef05e50595287e9d9fa (patch) | |
tree | 0964d2af87709fbc322b0c50e1a0e1c1b57eef0a | |
parent | 11a9d53222edde096ec6880981b63c363083004b (diff) | |
parent | 0646f756a24caac5bc6c77ec624428161d4348f2 (diff) | |
download | magnolia-fb514c8045df9eb36064aef05e50595287e9d9fa.tar.gz magnolia-fb514c8045df9eb36064aef05e50595287e9d9fa.tar.bz2 magnolia-fb514c8045df9eb36064aef05e50595287e9d9fa.zip |
Merge pull request #80 from jodersky/master
Cross-build for Scala Native
-rw-r--r-- | .travis.yml | 11 | ||||
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | build.sbt | 41 | ||||
-rw-r--r-- | project/build.properties | 2 | ||||
-rw-r--r-- | project/plugins.sbt | 5 |
5 files changed, 56 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5575c91 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +sudo: required +dist: trusty +language: scala + +before_install: +- curl https://raw.githubusercontent.com/scala-native/scala-native/9069e8d447f7a9a5439bffbb6a706b5cc70bd631/bin/travis_setup.sh | bash -x + +script: + - sbt +compile +tests/run +jdk: + - oraclejdk8 @@ -1,5 +1,9 @@ # Changelog +## v0.7.1 +- Support compilation for Scala Native +- Add travis build configuration + ## v0.7.0 - Fix regression related to deriving inner classes - Fix for derivations of case classes with alternative factory methods @@ -1,24 +1,52 @@ +// shadow sbt-scalajs' crossProject and CrossType until Scala.js 1.0.0 is released +import sbtcrossproject.{crossProject, CrossType} import com.typesafe.sbt.pgp.PgpKeys.publishSigned -lazy val core = crossProject +lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("core")) .settings(buildSettings: _*) .settings(publishSettings: _*) .settings(scalaMacroDependencies: _*) .settings(moduleName := "magnolia") + .settings( + scalaVersion := crossScalaVersions.value.head + ) + .jvmSettings( + crossScalaVersions := "2.12.4" :: "2.13.0-M3" :: "2.11.12" :: Nil + ) + .jsSettings( + crossScalaVersions := "2.12.4" :: "2.11.12" :: Nil + ) + .nativeSettings( + crossScalaVersions := "2.11.12" :: Nil + ) lazy val coreJVM = core.jvm lazy val coreJS = core.js +lazy val coreNative = core.native -lazy val examples = crossProject +lazy val examples = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("examples")) .settings(buildSettings: _*) .settings(publishSettings: _*) .settings(moduleName := "magnolia-examples") + .jvmSettings( + crossScalaVersions := (crossScalaVersions in coreJVM).value, + scalaVersion := (scalaVersion in coreJVM).value + ) + .jsSettings( + crossScalaVersions := (crossScalaVersions in coreJS).value, + scalaVersion := (scalaVersion in coreJS).value + ) + .nativeSettings( + crossScalaVersions := (crossScalaVersions in coreNative).value, + scalaVersion := (scalaVersion in coreNative).value + ) .dependsOn(core) lazy val examplesJVM = examples.jvm lazy val examplesJS = examples.js +lazy val examplesNative = examples.native lazy val tests = project .in(file("tests")) @@ -37,8 +65,12 @@ lazy val tests = project ) .dependsOn(examplesJVM) - - +lazy val root = (project in file(".")) + .aggregate(coreJVM, coreJS, coreNative, examplesJVM, examplesJS, examplesNative, tests) + .settings( + publish := {}, + publishLocal := {} + ) lazy val benchmarks = project .in(file("benchmarks")) @@ -48,7 +80,6 @@ lazy val benchmarks = project lazy val buildSettings = Seq( organization := "com.propensive", - crossScalaVersions := Seq("2.11.11", "2.12.4"), name := "magnolia", version := "0.7.1", scalacOptions ++= Seq( diff --git a/project/build.properties b/project/build.properties index 8b697bb..31334bb 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.1.0 +sbt.version=1.1.1 diff --git a/project/plugins.sbt b/project/plugins.sbt index 595dbcc..4db006e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,4 +2,7 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.1") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.21") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22") +addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.3.1") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.3.1") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.6")
\ No newline at end of file |