-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
89 lines (62 loc) · 2.1 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
import SonatypeKeys._
// Metadata
organization := "com.codemettle.akka-snmp4j"
name := "akka-snmp4j"
description := "Library to aid usage of SNMP4J in Scala + Akka"
startYear := Some(2014)
homepage := Some(url("https://github.com/CodeMettle/akka-snmp4j"))
organizationName := "CodeMettle, LLC"
organizationHomepage := Some(url("http://www.codemettle.com"))
licenses += ("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
scmInfo := Some(
ScmInfo(url("https://github.com/CodeMettle/akka-snmp4j"), "scm:git:https://github.com/CodeMettle/akka-snmp4j.git",
Some("scm:git:[email protected]:CodeMettle/akka-snmp4j.git")))
pomExtra := {
<developers>
<developer>
<name>Steven Scott</name>
<email>[email protected]</email>
<url>https://github.com/codingismy11to7/</url>
</developer>
</developers>
}
// Build
crossScalaVersions := Seq("2.12.10", "2.13.1")
scalaVersion := crossScalaVersions.value.last
scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation")
libraryDependencies ++= Seq(
Deps.akkaActor,
Deps.akkaStream,
Deps.snmp4j
) map (_ % Provided)
libraryDependencies ++= Seq(
Deps.akkaSlf,
Deps.akkaTest,
Deps.logback,
Deps.ficus,
Deps.scalaTest
) map (_ % Test)
publishArtifact in Test := true
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
xerial.sbt.Sonatype.sonatypeSettings
profileName := "com.codemettle"