This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.sbt
127 lines (115 loc) · 4.01 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
import com.typesafe.sbt.pgp.PgpKeys
import Keys._
import sbtrelease.ReleasePlugin.autoImport._
import sbtrelease._
def repository(isSnapshot: Boolean) = {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
lazy val commonSettings = Seq(
description := "Scala language integration for the Dropwizard project.",
homepage := Option(url("http://github.com/datasift/dropwizard-scala")),
startYear := Option(2014),
licenses += ("Apache License 2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")),
organization := "com.datasift.dropwizard.scala",
scmInfo := Option(ScmInfo(
browseUrl = url("http://github.com/dropwizard/dropwizard-scala/"),
connection = "git://github.com/dropwizard/dropwizard-scala.git",
devConnection = Option("[email protected]@:dropwizard/dropwizard-scala.git")
)),
scalaVersion := "2.12.1",
crossScalaVersions := Seq("2.11.11", "2.12.2"),
scalacOptions ++=
"-deprecation" ::
"-unchecked" ::
"-language:implicitConversions" ::
"-language:higherKinds" ::
"-feature" ::
Nil,
javacOptions ++= "-source" :: "1.8" :: "-target" :: "1.8" :: Nil,
resolvers in ThisBuild ++= Seq(
"Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository",
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
),
libraryDependencies ++= Seq(
"org.log4s" %% "log4s" % "1.3.4",
"org.scalatest" %% "scalatest" % Versions.scalaTest % "test",
"org.mockito" % "mockito-core" % Versions.mockito % "test"
),
publishMavenStyle := true,
publishTo := isSnapshot(repository).value,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := {
<developers>
<developer>
<id>nicktelford</id>
<name>Nick Telford</name>
<email>[email protected]</email>
</developer>
</developers>
},
unmanagedSourceDirectories in Compile +=
(sourceDirectory in Compile).value / ("scala_" + scalaBinaryVersion.value),
PgpKeys.useGpg := true,
PgpKeys.useGpgAgent := true,
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseVersion := identity[String],
releaseNextVersion := { Version(_).map { v =>
v.withoutQualifier.string + "-" + v.qualifier
.flatMap(x => scala.util.Try(x.stripPrefix("-").toInt).toOption)
.map(_ + 1).getOrElse(1)
}.getOrElse(versionFormatError(version.value)) }
)
lazy val core = (project in file("core"))
.settings(
name := "Dropwizard scala core",
normalizedName := "dropwizard-scala-core",
commonSettings
)
.dependsOn(jersey, validation, metrics, test % "test", jdbi % "test")
lazy val jersey = (project in file("jersey"))
.settings(
name := "Dropwizard scala jersey",
normalizedName := "dropwizard-scala-jersey",
commonSettings
)
lazy val validation = (project in file("validation"))
.settings(
name := "Dropwizard scala validation",
normalizedName := "dropwizard-scala-validation",
commonSettings
)
lazy val jdbi = (project in file("jdbi"))
.settings(
name := "Dropwizard scala jdbi",
normalizedName := "dropwizard-scala-jdbi",
commonSettings
)
lazy val metrics = (project in file("metrics"))
.settings(
name := "Dropwizard scala metrics",
normalizedName := "dropwizard-scala-metrics",
commonSettings
)
lazy val test = (project in file("test"))
.settings(
name := "Dropwizard scala test",
normalizedName := "dropwizard-scala-test",
commonSettings
)
lazy val parent = (project in file("."))
.settings(
commonSettings,
name := "Dropwizard scala parent",
normalizedName := "dropwizard-scala-parent",
publishArtifact := false,
Keys.`package` := file(""),
packageBin in Global := file(""),
packagedArtifacts := Map()
)
.aggregate(core, jersey, jdbi, validation, metrics, test)