Skip to content

Commit

Permalink
Merge pull request #101 from cquiroz/scala-native-v0.5.x
Browse files Browse the repository at this point in the history
Scala native v0.5.x
  • Loading branch information
cquiroz authored Sep 20, 2017
2 parents 96ba14d + 4f3aa94 commit 2505d0b
Showing 4 changed files with 50 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -8,18 +8,19 @@ scala:
jdk:
- oraclejdk8
env:
- TRAVIS_NODE_VERSION="5.12.0" SCALAJS_VERSION="0.6.18"
- TRAVIS_NODE_VERSION="5.12.0" SCALAJS_VERSION="0.6.20"
- TRAVIS_NODE_VERSION="5.12.0" SCALAJS_VERSION="1.0.0-M1"
- TRAVIS_NODE_VERSION="6.10.0" SCALAJS_VERSION="0.6.18"
- TRAVIS_NODE_VERSION="6.10.0" SCALAJS_VERSION="0.6.20"
- TRAVIS_NODE_VERSION="6.10.0" SCALAJS_VERSION="1.0.0-M1"
- TRAVIS_NODE_VERSION="7.6.0" SCALAJS_VERSION="0.6.18"
- TRAVIS_NODE_VERSION="7.6.0" SCALAJS_VERSION="0.6.20"
- TRAVIS_NODE_VERSION="7.6.0" SCALAJS_VERSION="1.0.0-M1"
install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- npm install
script:
- sbt -Djava.locale.providers=CLDR ++$TRAVIS_SCALA_VERSION macroUtils/publishLocal
- sbt -Djava.locale.providers=CLDR ++$TRAVIS_SCALA_VERSION coreJS/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteJS/scalastyle testSuiteJS/test:scalastyle
- sbt -Djava.locale.providers=CLDR ++$TRAVIS_SCALA_VERSION coreJS/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteJS/scalastyle testSuiteJS/test:scalastyle coreNative/scalastyle coreJVM/scalastyle
- if [[ $TRAVIS_SCALA_VERSION == "2.11.11" ]]; then sbt ++$TRAVIS_SCALA_VERSION coreNative/compile; fi;
- sbt -Djava.locale.providers=CLDR ++$TRAVIS_SCALA_VERSION testSuiteJVM/test
- sbt -Djava.locale.providers=CLDR ++$TRAVIS_SCALA_VERSION '; set scalaJSStage in Global := FullOptStage' testSuiteJS/test
# Tricks to avoid unnecessary cache updates, from
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -110,6 +110,27 @@ A very simple `Scala.js` project is available at [scalajs-locales-demo](https://
+ Timothy Klim [@TimothyKlim](https://github.com/TimothyKlim)
+ Andrea Peruffo [@andreaTP](https://github.com/AndreaTP)

## Publishing

on 0.6.x
```
sbt
clean
+publishSigned
coreNative/publishSigned
sonatyeRelease
```

Important: Remember to clean between different scala.js versions

on 1.0.0-M1
```
SCALAJS_VERSION=1.0.0-M1 sbt
clean
+publishSigned
sonatyeRelease
```

## License

Copyright © 2016 Carlos Quiroz
15 changes: 11 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sbtcrossproject.{crossProject, CrossType}
import sbt.Keys._
import LDMLTasks._

@@ -85,9 +86,10 @@ lazy val scalajs_locales: Project = project.in(file("."))
publish := {},
publishLocal := {}
)
// don't include scala-native by default
.aggregate(coreJS, coreJVM, testSuiteJS, testSuiteJVM)

lazy val core = crossProject.
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform).
crossType(CrossType.Pure).
settings(commonSettings: _*).
settings(
@@ -126,8 +128,12 @@ lazy val coreJS: Project = core.js
)

lazy val coreJVM: Project = core.jvm
lazy val coreNative: Project = core.native
.settings(
sources in (Compile,doc) := Seq.empty
)

lazy val testSuite = crossProject.
lazy val testSuite = crossProject(JVMPlatform, JSPlatform, NativePlatform).
settings(commonSettings: _*).
settings(
publish := {},
@@ -141,7 +147,7 @@ lazy val testSuite = crossProject.
parallelExecution in Test := false,
name := "scala-java-locales testSuite on JS",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.9" % "test",
"com.novocode" % "junit-interface" % "0.11" % "test",
"io.github.cquiroz" %% "macroutils" % "0.0.1" % "provided"
)
).
@@ -154,7 +160,7 @@ lazy val testSuite = crossProject.
javaOptions in Test ++= Seq("-Duser.language=en", "-Duser.country=", "-Djava.locale.providers=CLDR", "-Dfile.encoding=UTF8"),
name := "scala-java-locales testSuite on JVM",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.9" % "test",
"com.novocode" % "junit-interface" % "0.11" % "test",
"io.github.cquiroz" %% "macroutils" % "0.0.1" % "provided"
)
).
@@ -184,3 +190,4 @@ lazy val macroUtils = project.in(file("macroUtils")).

lazy val testSuiteJS: Project = testSuite.js
lazy val testSuiteJVM: Project = testSuite.jvm
lazy val testSuiteNative: Project = testSuite.native
14 changes: 13 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.18")
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.20")

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

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

// For sbt-crossproject support even with Scala.js 0.6.x
{
if (scalaJSVersion.startsWith("0.6."))
Seq(addSbtPlugin("org.scala-native" % "sbt-scalajs-crossproject" % "0.2.2"))
else
Nil
}

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.3")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

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

0 comments on commit 2505d0b

Please sign in to comment.