diff --git a/build.sbt b/build.sbt index bfba97e..4c62b14 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,6 @@ +// shadow sbt-scalajs' crossProject and CrossType from Scala.js 0.6.x +import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} + organization := "tv.cntt" name := "scaposer" version := "1.11.1-SNAPSHOT" @@ -9,9 +12,16 @@ scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked") javacOptions ++= Seq("-source", "1.8", "-target", "1.8") // Scala 2.11+ core does not include scala.util.parsing.combinator -libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" +libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "1.1.2" + +libraryDependencies += "org.specs2" %%% "specs2-core" % "4.10.2" % "test" + +lazy val scaposer = crossProject(JVMPlatform, JSPlatform) + .crossType(CrossType.Pure) -libraryDependencies += "org.specs2" %% "specs2-core" % "4.6.0" % "test" +lazy val scaposerJS = scaposer.js +lazy val scaposerJVM = scaposer.jvm -//https://github.com/scala/scala-parser-combinators/issues/197 -fork in Test := true \ No newline at end of file +lazy val root = (project in file(".")) + .aggregate(scaposerJS, scaposerJVM) + .settings(skip in publish := true) diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..7227adf --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,3 @@ +install: + - sbt '++ publishM2' + - env SCALAJS_VERSION="0.6.32" sbt '++ publishM2' diff --git a/project/build.properties b/project/build.properties index 8e682c5..654fe70 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.18 +sbt.version=1.3.12 diff --git a/project/plugins.sbt b/project/plugins.sbt index b599e4d..b6353b7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,7 @@ // Run sbt eclipse to create Eclipse project file addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") + +// http://www.scala-js.org/news/2020/02/25/announcing-scalajs-1.0.0/#cross-building-for-scalajs-06x-and-1x +val scalaJSVersion = scala.util.Properties.envOrElse("SCALAJS_VERSION", "1.1.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")