-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
71 lines (64 loc) · 2.05 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
import sbt._
import Keys._
import com.typesafe.sbt.pgp.PgpKeys._
val commonSettings = Seq(
organization := "com.github.omidb",
version := "0.1.1-SNAPSHOT",
scalaVersion := "2.11.6",
scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation", "-encoding", "utf8"),
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "utest" % "0.3.1" % "test"
)
)
def preventPublication(p: Project) =
p.settings(
publish :=(),
publishLocal :=(),
publishSigned :=(),
publishLocalSigned :=(),
publishArtifact := false,
publishTo := Some(Resolver.file("Unused transient repository", target.value / "fakepublish")),
packagedArtifacts := Map.empty)
lazy val dgraph = crossProject
.settings(commonSettings: _*)
.settings(
name := "dgraph",
scmInfo := Some(ScmInfo(
url("https://github.com/omidb/dgraph"),
"scm:git:[email protected]:omidb/dgraph.git",
Some("scm:git:[email protected]:omidb/dgraph.git"))),
publishMavenStyle := true,
publishArtifact in Test := false,
pomExtra :=
<url>https://github.com/omidb/dgraph</url>
<licenses>
<license>
<name>MIT license</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<id>omidb</id>
<name>Omid Bakhshandeh</name>
<url>https://github.com/omidb</url>
</developer>
</developers>,
pomIncludeRepository := { _ => false },
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")
}
).jsSettings(
scalaJSStage in Global := FullOptStage
).jvmSettings(
)
lazy val dgraphJS = dgraph.js
lazy val dgraphJVM = dgraph.jvm
lazy val root = preventPublication(project.in(file(".")))
.settings()
.aggregate(dgraphJS, dgraphJVM)