-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
135 lines (123 loc) · 4.13 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
crossScalaVersions := Seq("2.12.4", "2.11.12")
scalaVersion in Global := crossScalaVersions.value.head
lazy val commonSettings = Seq(
version := "0.6-SNAPSHOT",
organization := "com.hypertino",
resolvers ++= Seq(
Resolver.sonatypeRepo("public")
),
libraryDependencies += {
macroParadise
}
)
// external dependencies
lazy val binders = "com.hypertino" %% "binders" % "1.2.0"
lazy val jsonBinders = "com.hypertino" %% "json-binders" % "1.2.0"
lazy val configBinders = "com.hypertino" %% "typesafe-config-binders" % "0.2.0"
lazy val ramlUtils = "com.hypertino" %% "hyperbus-utils" % "0.1-SNAPSHOT"
lazy val scalaMock = "org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test"
lazy val monix = "io.monix" %% "monix" % "2.3.2"
lazy val scaldi = "org.scaldi" %% "scaldi" % "0.5.8"
lazy val scalaUri = "com.hypertino" %% "scala-uri" % "0.4.19-NO-SPRAY"
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
lazy val apacheLang3 = "org.apache.commons" % "commons-lang3" % "3.6"
lazy val logback = "ch.qos.logback" % "logback-classic" % "1.1.8"
lazy val quasiQuotes = "org.scalamacros" %% "quasiquotes" % "2.1.0" cross CrossVersion.binary
lazy val macroParadise = compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
lazy val `hyperbus-macro` = project in file("hyperbus-macro") settings (
commonSettings,
publishSettings,
name := "hyperbus-macro",
libraryDependencies ++= Seq(
binders,
logback % "test"
)
)
lazy val `hyperbus` = project in file("hyperbus") settings (
commonSettings,
publishSettings,
name := "hyperbus",
libraryDependencies ++= Seq(
monix,
binders,
jsonBinders,
ramlUtils,
scaldi,
configBinders,
scalaUri,
apacheLang3,
scalaLogging,
scalaMock,
logback % "test"
)
) dependsOn `hyperbus-macro`
lazy val `hyperbus-t-inproc` = project in file("hyperbus-t-inproc") settings (
commonSettings,
publishSettings,
name := "hyperbus-t-inproc",
libraryDependencies ++= Seq(
scalaLogging,
scalaMock,
scaldi,
logback % "test"
)
) dependsOn `hyperbus`
lazy val `hyperbus-root` = project.in(file(".")) settings (
publishSettings,
publishArtifact := false,
publishArtifact in Test := false,
publish := {},
publishLocal := {}
) aggregate (
`hyperbus-macro`,
`hyperbus`,
`hyperbus-t-inproc`
)
// Sonatype repositary publish options
val publishSettings = Seq(
publishMavenStyle := true,
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")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false},
// pgp keys and credentials
pgpSecretRing := file("./travis/script/ht-oss-private.asc"),
pgpPublicRing := file("./travis/script/ht-oss-public.asc"),
usePgpKeyHex("F8CDEF49B0EDEDCC"),
pgpPassphrase := Option(System.getenv().get("oss_gpg_passphrase")).map(_.toCharArray),
pomExtra :=
<url>https://github.com/hypertino/hyperbus</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://opensource.org/licenses/BSD-3-Clause</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:hypertino/hyperbus.git</url>
<connection>scm:git:[email protected]:hypertino/hyperbus.git</connection>
</scm>
<developers>
<developer>
<id>maqdev</id>
<name>Magomed Abdurakhmanov</name>
<url>https://github.com/maqdev</url>
</developer>
<developer>
<id>hypertino</id>
<name>Hypertino</name>
<url>https://github.com/hypertino</url>
</developer>
</developers>
)
// Sonatype credentials
credentials ++= (for {
username <- Option(System.getenv().get("sonatype_username"))
password <- Option(System.getenv().get("sonatype_password"))
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq