-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
85 lines (64 loc) · 2.16 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
// Metadata
organization := "com.codemettle.reactivemq"
name := "reactivemq"
description := "Akka-based ActiveMQ client"
startYear := Some(2015)
homepage := Some(url("https://github.com/CodeMettle/reactivemq"))
organizationName := "CodeMettle, LLC"
organizationHomepage := Some(url("http://www.codemettle.com"))
// Build
crossScalaVersions := Seq("2.11.12", "2.12.5", "2.13.0")
scalaVersion := crossScalaVersions.value.last
scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation")
scalacOptions += {
CrossVersion partialVersion scalaVersion.value match {
case Some((x, y)) if x >= 2 && y >= 12 => "-target:jvm-1.8"
case _ => "-target:jvm-1.6"
}
}
unmanagedSourceDirectories in Compile ++= {
(unmanagedSourceDirectories in Compile).value.map { dir =>
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => file(dir.getPath ++ "-2.13+")
case _ => file(dir.getPath ++ "-2.13-")
}
}
}
libraryDependencies ++= Seq(
Deps.akkaActor % Provided,
Deps.activemqClient % Provided
)
libraryDependencies ++= Seq(
Deps.activemqBroker,
Deps.activemqCamel,
Deps.activemqJaas,
Deps.akkaSlf,
Deps.akkaTest,
Deps.camel,
Deps.jclOverSlf4j,
Deps.logback,
Deps.scalaTest
) map (_ % Test)
autoAPIMappings := true
apiMappings ++= {
val cp: Seq[Attributed[File]] = (fullClasspath in Compile).value
def findManagedDependency(moduleId: ModuleID): File = {
( for {
entry <- cp
module <- entry.get(moduleID.key)
if module.organization == moduleId.organization
if module.name startsWith moduleId.name
jarFile = entry.data
} yield jarFile
).head
}
Map(
findManagedDependency("org.scala-lang" % "scala-library" % scalaVersion.value) -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"),
findManagedDependency(Deps.akkaActor) -> url(s"http://doc.akka.io/api/akka/${Versions.akka}/")
)
}
// Release
releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseCrossBuild := true
// Publish
publishTo := sonatypePublishTo.value