-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
96 lines (84 loc) · 3.08 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
name := "scales"
description in ThisBuild := "A Web Component based UI framework written in Scala.js."
organization in ThisBuild := "com.greencatsoft"
version in ThisBuild := "0.2-SNAPSHOT"
homepage in ThisBuild := Some(url("http://github.com/greencatsoft/scales"))
licenses in ThisBuild := Seq("Apache License 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
pomExtra in ThisBuild := (
<scm>
<url>[email protected]:greencatsoft/scalajs-angular.git</url>
<connection>scm:git:[email protected]:greencatsoft/scalajs-angular.git</connection>
</scm>
<developers>
<developer>
<id>mysticfall</id>
<name>Xavier Cho</name>
<url>http://github.com/mysticfall</url>
</developer>
</developers>
)
resolvers in ThisBuild += Resolver.sonatypeRepo("snapshots")
val scalaSettings = Seq(
scalaVersion := "2.11.7",
scalacOptions ++= Seq("-feature","-deprecation"),
unmanagedSourceDirectories in Compile := (scalaSource in Compile).value :: Nil,
unmanagedSourceDirectories in Test := (scalaSource in Test).value :: Nil)
val scalaJSSettings = Seq(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.1",
"org.scala-js" %%% "scala-parser-combinators" % "1.0.2",
"com.lihaoyi" %%% "scalatags" % "0.5.2"
)
)
lazy val scales = (project in file("."))
.settings(scalaSettings)
.settings(
publishTo := {
val nexus = "https://oss.sonatype.org/"
if(isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
unmanagedSourceDirectories in Compile := Nil,
unmanagedSourceDirectories in Test := Nil,
mappings in (Compile, packageBin) ++= mappings.in(scalesCore, Compile, packageBin).value,
mappings in (Compile, packageSrc) ++= mappings.in(scalesCore, Compile, packageSrc).value
)
.aggregate(scalesTest, scalesCore)
lazy val scalesCore = (project in file("core"))
.enablePlugins(ScalaJSPlugin)
.settings(scalaSettings)
.settings(scalaJSSettings)
.settings(
name := "scales-core",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "compile"),
publish := {},
publishLocal := {},
PgpKeys.publishSigned := {},
PgpKeys.publishLocalSigned := {}
)
lazy val scalesTest = (project in file("test"))
.enablePlugins(ScalaJSPlugin)
.settings(scalaSettings)
.settings(scalaJSSettings)
.settings(
name := "scales-test",
libraryDependencies ++= Seq(
"com.greencatsoft" %%% "greenlight" % "0.2" % "test"),
jsDependencies in Test ++= Seq(
ProvidedJS / "webcomponents.min.js",
ProvidedJS / "object-observe-lite.min.js",
RuntimeDOM
),
scalaJSStage in Test := FastOptStage,
testFrameworks := new TestFramework("com.greencatsoft.greenlight.Greenlight") :: Nil,
publish := {},
publishLocal := {},
PgpKeys.publishSigned := {},
PgpKeys.publishLocalSigned := {}
)
.dependsOn(scalesCore % "test->test;compile->compile")