| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- lazy val root = project.in(file("."))
- .aggregate(
- plugin,
- library,
- playPlugin
- ).settings(
- crossScalaVersions := Nil,
- publish / skip := true,
- )
- def commonSettings = Seq(
- organization := "com.tflucke",
- //maintainer := "Thomas Flucke <admin@tflucke.name>",
- scalacOptions ++= Seq(
- "-deprecation",
- "-unchecked"
- ),
- crossScalaVersions := Seq("2.12.11", "2.12.10")
- )
- /****** The Actual Plugin ******/
- lazy val plugin = (project in file("plugin"))
- .enablePlugins(SbtPlugin)
- .settings(commonSettings)
- .settings(
- addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.0"),
- name := "sbt-rest-rpc",
- version := "0.1.0-SNAPSHOT",
- publishLocal := (publishLocal dependsOn (library / publishLocal)).value
- ).dependsOn(library)
- /****** The Plugin Library ******/
- lazy val library = (project in file("library"))
- .enablePlugins(ScalaJSPlugin)
- .settings(commonSettings)
- .settings(
- name := "rest-rpc",
- version := "0.1.0-SNAPSHOT",
- libraryDependencies ++= (if (scalaJSVersion.startsWith("0.6.")) Seq(
- // Wrapper library for JS dom to scala
- // Docs: https://scala-js.github.io/scala-js-dom/
- // Scaladocs: https://www.javadoc.io/doc/org.scala-js/scalajs-dom_sjs1.0.0-M7_2.12/0.9.6/org/scalajs/dom/index.html
- "org.scala-js" %%% "scalajs-dom" % "0.9.8",
- "com.typesafe.play" %%% "play-json" % "2.8.1"
- ) else Seq(
- "org.scala-js" %%% "scalajs-dom" % "1.0.0",
- "com.typesafe.play" %%% "play-json" % "2.9.0"
- ))
- )
- /******* The Play Plugin *******/
- lazy val playPlugin = (project in file("play"))
- .enablePlugins(SbtPlugin)
- .settings(commonSettings)
- .settings(
- addSbtPlugin("com.tflucke" % "sbt-rest-rpc" % "0.1.0-SNAPSHOT"),
- name := "sbt-rest-rpc-play",
- version := "0.1.0-SNAPSHOT",
- libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % Test,
- logBuffered in Test := false,
- javaOptions in Runtime += "-Dlibrary.version="+(library / version).value,
- scriptedLaunchOpts := { scriptedLaunchOpts.value ++ Seq(
- "-Xmx1024M",
- "-Dplugin.version="+version.value,
- ) },
- scriptedBufferLog := false,
- publishLocal := (publishLocal dependsOn (plugin / publishLocal)).value
- ).dependsOn(plugin)
|