-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
81 lines (76 loc) · 2.52 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
import sbt.Keys.{ crossScalaVersions, homepage, publishMavenStyle, scmInfo }
lazy val spickleSettings = Seq(
organization := "com.github.rvanheest",
scalaVersion := "2.12.6",
crossScalaVersions := Seq("2.11.12", "2.12.6"),
licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html"),
homepage := Some(url("https://github.com/rvanheest/spickle")),
scmInfo := Some(
ScmInfo(
browseUrl = url("http://github.com/spickle/spickle"),
connection = "scm:git:[email protected]:spickle/spickle.git"
)),
pomExtra := <developers>
<developer>
<id>rvanheest</id>
<name>Richard van Heest</name>
<url>https://github.com/rvanheest</url>
<roles>
<role>Developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>,
pomIncludeRepository := { _ => false }
)
lazy val publishSettings = Seq(
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")
},
publishMavenStyle := true,
publishArtifact in Test := false,
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
releaseVersionFile := file("version.sbt"),
releaseTagName := s"v${
if (releaseUseGlobalVersion.value) (version in ThisBuild).value
else version.value
}",
releaseCrossBuild := true,
releaseCommitMessage := s"Setting version to ${ (version in ThisBuild).value }",
releasePublishArtifactsAction := PgpKeys.publishSigned.value
)
lazy val spickle = project.in(file("."))
.settings(spickleSettings,
name := "spickle",
publishArtifact := false
)
.aggregate(spickleLib)
lazy val spickleLib = Project(
id = "spickle-core",
base = file("core"),
settings = spickleSettings ++ publishSettings ++ Seq(
name := "spickle",
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.3",
"org.scala-lang.modules" %% "scala-xml" % "1.0.6" % "provided",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scoverage" %% "scalac-scoverage-runtime" % "1.3.0" % "test"
)
)
)
lazy val spickleExample = Project(
id = "spickle-example",
base = file("example"),
settings = spickleSettings ++ Seq(
name := "spickle-example",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.1.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
),
publishArtifact := false
)
).dependsOn(spickleLib)