-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sbt
117 lines (103 loc) · 2.92 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
organization in ThisBuild := "io.underscore"
version in ThisBuild := "0.6.0-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.8"
licenses in ThisBuild += ("Apache-2.0", url("http://apache.org/licenses/LICENSE-2.0"))
scalacOptions in ThisBuild ++= Seq(
"-feature",
"-unchecked",
"-deprecation:false",
"-Xfatal-warnings"
)
pomExtra in Global := {
<url>https://github.com/underscoreio/compose</url>
<scm>
<connection>scm:git:github.com/underscoreio/compose</connection>
<developerConnection>scm:git:[email protected]:underscoreio/compose</developerConnection>
<url>github.com/underscoreio/compose</url>
</scm>
<developers>
<developer>
<id>davegurnell</id>
<name>Dave Gurnell</name>
<url>http://twitter.com/davegurnell</url>
</developer>
</developers>
}
lazy val noPublishSettings = Seq(
publish := {},
publishArtifact := false
)
lazy val core = crossProject
.crossType(CrossType.Pure)
.settings(name := "compose-core")
.settings(libraryDependencies ++= Seq(
"org.scala-js" %% "scalajs-stubs" % scalaJSVersion % Provided,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.typelevel" %%% "cats-core" % "1.0.0-MF",
"org.scalatest" %% "scalatest" % "2.2.6" % Test
))
lazy val coreJVM = core.jvm
lazy val coreJS = core.js
lazy val examples = crossProject
.crossType(CrossType.Pure)
.dependsOn(core)
.settings(name := "compose-examples")
.settings(libraryDependencies ++= Seq(
"org.scala-js" %% "scalajs-stubs" % scalaJSVersion % Provided
))
lazy val examplesJVM = examples.jvm
lazy val examplesJS = examples.js
lazy val player = crossProject
.crossType(CrossType.Dummy)
.dependsOn(core)
.settings(name := "compose-player")
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats" % "0.7.0"
)
)
.jvmSettings(
libraryDependencies ++= Seq(
"de.sciss" %% "scalacollider" % "1.20.1",
"org.scalatest" %% "scalatest" % "2.2.6" % Test
)
)
.jsSettings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.0"
)
)
lazy val playerJVM = player.jvm
lazy val playerJS = player.js
lazy val demo = crossProject
.crossType(CrossType.Dummy)
.dependsOn(player, examples)
.settings(noPublishSettings : _*)
.settings(name := "compose-demo")
.jsSettings(
persistLauncher := true,
persistLauncher in Test := false
)
.jvmSettings(
initialCommands in console := """
|import compose.core._
|import compose.examples._
|import compose.player._
""".trim.stripMargin
)
lazy val demoJVM = demo.jvm
lazy val demoJS = demo.js
lazy val root = project.in(file("."))
.aggregate(
coreJVM,
coreJS,
examplesJVM,
examplesJS,
playerJVM,
playerJS,
demoJVM,
demoJS
)
.settings(noPublishSettings : _*)
run <<= run in (demoJVM, Compile)
console <<= console in (demoJVM, Compile)