-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
117 lines (104 loc) · 3.02 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
inThisBuild(Seq(
version := "0.4.0-"+git.gitHeadCommit.value.get.take(8),
organization := "com.github.mariusmuja",
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq("2.12.9", "2.11.12"),
javacOptions in Compile ++= Seq(
"-source", "1.7",
"-target", "1.7"
),
scalacOptions += {
val local = baseDirectory.value.toURI
val remote = s"https://raw.githubusercontent.com/mariusmuja/outwatch-extras/${git.gitHeadCommit.value.get}/"
s"-P:scalajs:mapSourceURI:$local->$remote"
},
scalacOptions ++=
"-encoding" :: "UTF-8" ::
"-unchecked" ::
"-deprecation" ::
"-explaintypes" ::
"-feature" ::
"-language:_" ::
"-Xcheckinit" ::
"-Xfuture" ::
"-Xlint" ::
"-Ypartial-unification" ::
"-Yno-adapted-args" ::
"-Ywarn-infer-any" ::
"-Ywarn-value-discard" ::
"-Ywarn-nullary-override" ::
"-Ywarn-nullary-unit" ::
"-P:scalajs:sjsDefinedByDefault" ::
Nil,
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")),
resolvers += "jitpack" at "https://jitpack.io",
publishArtifact in Test := false,
)
)
val outwatch = Def.setting("com.github.mariusmuja" %%% "outwatch" % "1.0.0-RC1-2a945b8a" )
val noPublish = Seq(
publishArtifact := false,
publish := {},
publishLocal := {}
)
lazy val extras = project.in(file("."))
.settings(
name := "outwatch-extras"
)
.aggregate(app, redux, styles, mdl, router, util)
.dependsOn(redux, styles, mdl, router, util)
.enablePlugins(ScalaJSPlugin, GitVersioning)
lazy val app = project.in(file("demo-spa"))
.settings(
name := "demo-spa",
useYarn := true,
webpackBundlingMode := BundlingMode.LibraryAndApplication(),
scalaJSUseMainModuleInitializer := true
)
.settings(noPublish: _*)
.dependsOn(redux, styles, mdl, router)
.enablePlugins(ScalaJSBundlerPlugin, GitVersioning)
lazy val styles = project.in(file("outwatch-styles"))
.settings(
name := "outwatch-styles",
libraryDependencies ++=
outwatch.value ::
"com.github.japgolly.scalacss" %%% "core" % "0.5.4" ::
Nil
)
.enablePlugins(ScalaJSPlugin, GitVersioning)
lazy val util = project.in(file("outwatch-util"))
.settings(
name := "outwatch-util",
libraryDependencies ++=
outwatch.value ::
Nil
)
.enablePlugins(ScalaJSPlugin, GitVersioning)
lazy val mdl = project.in(file("outwatch-mdl"))
.settings(
name := "outwatch-mdl",
libraryDependencies ++=
outwatch.value ::
Nil
)
.enablePlugins(ScalaJSPlugin, GitVersioning)
lazy val router = project.in(file("outwatch-router"))
.settings(
name := "outwatch-router",
libraryDependencies ++=
outwatch.value ::
"com.chuusai" %%% "shapeless" % "2.3.3" ::
Nil
)
.dependsOn(util)
.enablePlugins(ScalaJSPlugin, GitVersioning)
lazy val redux = project.in(file("outwatch-redux"))
.settings(
name := "outwatch-redux",
libraryDependencies ++=
outwatch.value ::
Nil
)
.dependsOn(util)
.enablePlugins(ScalaJSPlugin, GitVersioning)