Skip to content

Commit

Permalink
Fix SBT project references and dependency
Browse files Browse the repository at this point in the history
SBT detects now client and server as independent projects with their own
names. Also, when compiling the server for the first time the client is
also compiled as a dependency.
  • Loading branch information
jvican committed Jul 20, 2016
1 parent d3d6144 commit 0c27f0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cache:
- $HOME/.sbt/boot/
script:
- sbt test
- sbt scaladexJVM/universal:packageBin
- sbt server/universal:packageBin
# - sbt sbtScaladex/scripted

git:
Expand Down
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $ git submodule init
$ git submodule update
$ sbt
> data/reStart elastic # do only once to populate the indices
> project scaladexJVM # this is the server
> project server
> ~re-start
```

Expand Down
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ScalaJSHelper._
import org.scalajs.sbtplugin.cross.CrossProject

lazy val baseSettings = Seq(
organization := "ch.epfl.scala.index",
Expand Down Expand Up @@ -45,8 +46,8 @@ lazy val template = project
.dependsOn(model)
.enablePlugins(SbtTwirl)

lazy val scaladex = crossProject.crossType(CustomCrossType)
.in(new File(".")) // use local dir to create "client" and "server" folders
lazy val scaladex =
CrossProject("server", "client", new File("."), CustomCrossType)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
Expand Down Expand Up @@ -82,7 +83,7 @@ lazy val server = scaladex.jvm
"-Xmx3g"
)
)
.dependsOn(template, data)
.dependsOn(client, template, data)
.enablePlugins(SbtSass, JavaServerAppPackaging)

lazy val model = project
Expand Down

0 comments on commit 0c27f0f

Please sign in to comment.