Unverified Commit dd1f9502 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[GUI] fix: separate scalajs dependencies from the bundles.

parent e1781367
......@@ -144,13 +144,7 @@ object OSGi extends Defaults {
lazy val scalaUpickleVersion = "0.2.6"
lazy val scalaAutowireVersion = "0.2.5"
lazy val scalajsVersion = "0.6.8"
lazy val jsSuffix = "_sjs0.6"
lazy val scalajsDom = OsgiProject("scalajs-dom", exports = Seq("org.scalajs.dom.*")) settings(
libraryDependencies += "org.scala-js" %%% ("scalajs-dom" + jsSuffix) % scalaDomVersion, version := scalaDomVersion)
lazy val querkijQuery = OsgiProject("querki-jquery", exports = Seq("org.querki.*")) settings(
libraryDependencies += "org.querki" %%% ("jquery-facade"+jsSuffix) % "0.11", version := querkiJSQueryVersion)
lazy val scalajsTools = OsgiProject("scalajs-tools", exports = Seq("scala.scalajs.*", "org.scalajs.core.tools.*", "org.scalajs.core.ir.*", "com.google.javascript.*", "com.google.common.*", "rhino_ast.java.com.google.javascript.rhino.*", "org.json.*")) settings(
libraryDependencies += "org.scala-js" %% "scalajs-tools" % scalajsVersion, version := scalajsVersion)
......@@ -160,45 +154,31 @@ object OSGi extends Defaults {
version := scalajsVersion
)
lazy val scalaTags = OsgiProject("com.scalatags", exports = Seq("scalatags.*", "*.sjsir")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalatags" % scalaTagsVersion,
"com.lihaoyi" %%% ("scalatags" + jsSuffix) % scalaTagsVersion),
version := scalaTagsVersion
)
libraryDependencies ++= Seq("com.lihaoyi" %% "scalatags" % scalaTagsVersion),
version := scalaTagsVersion)
lazy val scalatexSite =
OsgiProject("com.lihaoyi.scalatex-site", exports = Seq("scalatex.*", "ammonite.*", "fastparse.*"), privatePackages = Seq("!scala.*", "!scalatags.*", "META-INF.**", "*"), imports = Seq("*")) settings (
libraryDependencies += "com.lihaoyi" %% "scalatex-site" % "0.3.5",
version := "0.3.5"
)
version := "0.3.5")
lazy val rx = OsgiProject("rx", exports = Seq("rx.*", "*.sjsir")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalarx" % scalaRxVersion,
"com.lihaoyi" %%% ("scalarx" + jsSuffix) % scalaRxVersion),
version := scalaRxVersion
)
lazy val rx = OsgiProject("rx", exports = Seq("rx.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalarx" % scalaRxVersion),
version := scalaRxVersion)
lazy val upickle = OsgiProject("upickle", exports = Seq("upickle.*", "jawn.*", "*.sjsir"), imports = Seq("*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "upickle" % scalaUpickleVersion,
"com.lihaoyi" %%% ("upickle" + jsSuffix) % scalaUpickleVersion),
version := scalaUpickleVersion
)
lazy val upickle = OsgiProject("upickle", exports = Seq("upickle.*", "jawn.*"), imports = Seq("*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "upickle" % scalaUpickleVersion),
version := scalaUpickleVersion)
lazy val autowire = OsgiProject("autowire", exports = Seq("autowire.*", "*.sjsir")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "autowire" % scalaAutowireVersion,
"com.lihaoyi" %%% ("autowire" + jsSuffix) % scalaAutowireVersion),
version := scalaAutowireVersion
)
lazy val autowire = OsgiProject("autowire", exports = Seq("autowire.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "autowire" % scalaAutowireVersion),
version := scalaAutowireVersion)
lazy val jawnVersion = "0.6.0"
lazy val jawn = OsgiProject("jawn", exports = Seq("jawn.*", "utf8.json")) settings(
libraryDependencies += "org.spire-math" %% "jawn-parser" % jawnVersion, version := jawnVersion)
lazy val scaladgetVersion = "0.8.0-SNAPSHOT"
lazy val scaladget = OsgiProject("scaladget", exports = Seq("fr.iscpif.scaladget.*", "org.querki.jsext.*","*.sjsir")) settings(
libraryDependencies += "fr.iscpif" %%% ("scaladget" + jsSuffix) % scaladgetVersion, version := scaladgetVersion)
lazy val jsonSimpleVersion = "1.1.1"
lazy val jsonSimple = OsgiProject("json-simple", exports = Seq("org.json.simple.*")) settings(
libraryDependencies += "com.googlecode.json-simple" % "json-simple" % jsonSimpleVersion, version := jsonSimpleVersion)
......@@ -250,8 +230,7 @@ object OSGi extends Defaults {
OsgiProject("scala-async") settings (
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.1",
version := "0.9.1",
exportPackage := Seq("scala.async.*")
)
exportPackage := Seq("scala.async.*"))
lazy val mathVersion = "3.5"
lazy val math = OsgiProject("org.apache.commons.math", exports = Seq("org.apache.commons.math3.*"), privatePackages = Seq("assets.*")) settings
......
......@@ -109,7 +109,6 @@ object Bin extends Defaults(Core, Plugin, REST, Gui, Libraries, ThirdParties, ro
lazy val guiCoreDependencies = Seq(
scalajsTools,
scalajsDom,
scalaTags,
autowire,
upickle,
......@@ -117,7 +116,6 @@ object Bin extends Defaults(Core, Plugin, REST, Gui, Libraries, ThirdParties, ro
scalatra intransitive (),
scalajHttp,
txtmark,
scaladget,
clapper,
jquery,
scalajs
......
......@@ -11,7 +11,10 @@ object Doc extends Defaults {
override def dir = file("doc")
lazy val doc = OsgiProject("org.openmole.doc") enablePlugins (ScalaJSPlugin) settings (
libraryDependencies ++= Seq(scalajsDom, scalaTags, scaladget, rx)
scalajsDomJS,
scalaTagsJS,
scaladgetJS,
rxJS
)
override def osgiSettings = super.osgiSettings ++ Seq(bundleType := Set("doc"))
......
......@@ -97,27 +97,29 @@ object Libraries extends Defaults {
lazy val scalaAutowireVersion = "0.2.5"
lazy val upickle = "org.openmole" %% "upickle" % scalaUpickleVersion
lazy val autowire = "org.openmole" %% "autowire" % scalaAutowireVersion
lazy val scalaTags = "org.openmole" %% "com-scalatags" % scalaTagsVersion
lazy val rx = "org.openmole" %% "rx" % rxVersion
lazy val scaladgetVersion = "0.8.0-SNAPSHOT"
lazy val jsSuffix = ""
lazy val scalajsVersion = "0.6.8"
lazy val scaladgetJS = libraryDependencies += "fr.iscpif" %%% ("scaladget" + jsSuffix) % scaladgetVersion
lazy val scalajsDomJS = libraryDependencies += "org.scala-js" %%% ("scalajs-dom" + jsSuffix) % scalaJSDomVersion
lazy val rxJS = libraryDependencies += "com.lihaoyi" %%% ("scalarx" + jsSuffix) % rxVersion
lazy val scalaTagsJS = libraryDependencies += "com.lihaoyi" %%% ("scalatags" + jsSuffix) % scalaTagsVersion
lazy val autowireJS = libraryDependencies += "com.lihaoyi" %%% ("autowire" + jsSuffix) % scalaAutowireVersion
lazy val upickleJS = libraryDependencies += "com.lihaoyi" %%% ("upickle" + jsSuffix) % scalaUpickleVersion
lazy val scalajsTools = "org.openmole" %% "scalajs-tools" % scalajsVersion
lazy val scalajsLibrary = "org.openmole" %% "scalajs-library" % scalajsVersion
lazy val scalajsDom = "org.openmole" %% "scalajs-dom" % scalaJSDomVersion
lazy val scalajs = "org.openmole" %% "scalajs" % scalajsVersion
lazy val mgo = "org.openmole" %% "fr-iscpif-mgo" % "2.0"
lazy val family = "org.openmole" %% "fr-iscpif-family" % "1.3"
lazy val monocle = "org.openmole" %% "monocle" % "1.2.0"
lazy val scaladget = "org.openmole" %% "scaladget" % "0.8.0-SNAPSHOT"
lazy val d3 = "org.webjars" % "d3js" % d3Version
lazy val bootstrap = "org.webjars" % "bootstrap" % bootsrapVersion
......
......@@ -15,7 +15,13 @@ object Client extends GuiDefaults {
lazy val core = OsgiProject("org.openmole.gui.client.core") enablePlugins (ScalaJSPlugin) dependsOn
(Ext.dataui, Shared.shared, Misc.utils, Misc.js, root.Doc.doc) settings (
libraryDependencies ++= Seq(autowire, upickle, scalaTags, rx, scalajsDom, scaladget, async),
upickleJS,
autowireJS,
rxJS,
scalajsDomJS,
scaladgetJS,
scalaTagsJS,
libraryDependencies += async,
skip in packageJSDependencies := false,
jsDependencies += jquery / jqueryPath minified jqueryPath.replace(".js", ".min.js"),
jsDependencies += ace / acePath,
......
......@@ -11,10 +11,15 @@ object Ext extends GuiDefaults {
override val dir = super.dir / "ext"
lazy val data = OsgiProject("org.openmole.gui.ext.data") enablePlugins (ScalaJSPlugin) dependsOn (Core.workflow) settings (
libraryDependencies ++= Seq(upickle)
//libraryDependencies ++= Seq(upickle),
upickleJS
)
lazy val dataui: Project = OsgiProject("org.openmole.gui.ext.dataui") dependsOn (data, Misc.js) enablePlugins (ScalaJSPlugin) settings (
libraryDependencies ++= Seq(rx, scalaTags, scalajsDom)
//libraryDependencies ++= Seq(scalaTags),
rxJS,
scalaTagsJS,
scalajsDomJS
)
}
\ No newline at end of file
......@@ -11,11 +11,16 @@ object Misc extends GuiDefaults {
override val dir = super.dir / "misc"
lazy val utils = OsgiProject("org.openmole.gui.misc.utils") enablePlugins (ScalaJSPlugin) settings (
libraryDependencies ++= Seq(rx, scalaTags, scaladget)
rxJS,
scalaTagsJS,
scaladgetJS
)
lazy val js = OsgiProject("org.openmole.gui.misc.js") enablePlugins (ScalaJSPlugin) dependsOn
(Core.workspace, utils) settings (
libraryDependencies ++= Seq(scalajsDom, scalaTags, scaladget, rx)
scalajsDomJS,
scalaTagsJS,
scaladgetJS,
rxJS
)
}
\ No newline at end of file
......@@ -13,8 +13,7 @@ object Server extends GuiDefaults {
override val dir = super.dir / "server"
lazy val core = OsgiProject("org.openmole.gui.server.core") settings
(libraryDependencies ++= Seq(autowire, upickle, scalaTags, logback, scalatra, txtmark, clapper)) dependsOn
(
(libraryDependencies ++= Seq(autowire, upickle, scalaTags, logback, scalatra, txtmark, clapper)) dependsOn (
Shared.shared,
Ext.dataui,
Ext.data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment