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

[GUI] move bootstrap to server directory.

parent ffd602c5
......@@ -129,9 +129,6 @@ lazy val rx = OsgiProject(dir, "rx", exports = Seq("rx.*")) settings(
lazy val scalajsTools = OsgiProject(dir, "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) settings(settings: _*)
lazy val scalajsLibrary = OsgiProject(dir, "scalajs-library", 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-library" % scalajsVersion, version := scalajsVersion) settings(settings: _*)
lazy val scalaJS = OsgiProject(dir, "scalajs", exports = Seq("scala.scalajs.*"), imports = Seq("*")) settings (
libraryDependencies += "org.scala-js" %% "scalajs-library" % scalajsVersion,
version := scalajsVersion
......
......@@ -457,14 +457,20 @@ lazy val sharedGUI = OsgiProject(guiExt, "org.openmole.gui.ext.api") dependsOn (
val jqueryPath = s"META-INF/resources/webjars/jquery/${Libraries.jqueryVersion}/jquery.js"
val acePath = s"META-INF/resources/webjars/ace/${Libraries.aceVersion}/src-min/ace.js"
def guiBootstrapDir = guiDir / "bootstrap"
lazy val bootstrapGUI = OsgiProject(guiBootstrapDir, "org.openmole.gui.bootstrap") dependsOn(pluginManager, sharedGUI, serverGUI, fileService) settings(defaultSettings: _*) settings(
libraryDependencies += Libraries.scalajsLibrary,
lazy val bootstrapGUI = OsgiProject(guiServerDir, "org.openmole.gui.server.jscompile") dependsOn(pluginManager, sharedGUI, serverGUI, fileService) settings(defaultSettings: _*) settings(
libraryDependencies += "org.scala-js" %% "scalajs-library" % Libraries.scalajsVersion,
libraryDependencies += Libraries.scalajsTools,
OsgiKeys.embeddedJars := (Keys.externalDependencyClasspath in Compile).value map (_.data) filter (
_.getName startsWith "scalajs-library")
)
OsgiKeys.embeddedJars := {
val scalaLib =
(Keys.externalDependencyClasspath in Compile).value.filter {
d => d.data.getName startsWith "scalajs-library"
}.head
val dest = target.value / "scalajs-library.jar"
sbt.IO.copyFile(scalaLib.data, dest)
Seq(dest)
}
)
/* -------------- Client ------------------- */
......
......@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openmole.gui.bootstrap.js
package org.openmole.gui.server.jscompile
import java.net.URL
import java.io.{ FileOutputStream, File }
......@@ -92,7 +92,7 @@ object BootstrapJS {
}*/
writer.write("}")
}
JSPack.link(Seq(copyJar("scalajs-library_2.11-0.6.13"), jsSrc), new java.io.File(jsCompiled, JS_FILE))
JSPack.link(Seq(copyJar("scalajs-library"), jsSrc), new java.io.File(jsCompiled, JS_FILE))
}
// Extract and copy all the .sjsir files from bundles to src
......
......@@ -83,7 +83,6 @@ object Libraries {
lazy val upickleJS = libraryDependencies += "com.lihaoyi" %%% "upickle" % scalaUpickleVersion
lazy val scalajsTools = "org.openmole" %% "scalajs-tools" % scalajsVersion
lazy val scalajsLibrary = "org.openmole" %% "scalajs-library" % scalajsVersion
lazy val scalajs = "org.openmole" %% "scalajs" % scalajsVersion
lazy val mgo = "org.openmole" %% "fr-iscpif-mgo" % "2.0"
......
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