This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
66 lines (59 loc) · 2.15 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
val scala212Version = "2.12.12"
val scala213Version = "2.13.3"
val slf4jVersion = "1.7.+"
val scalaTestArtifact = "org.scalatest" %% "scalatest" % "3.2.2" % Test
val slf4jApiArtifact = "org.slf4j" % "slf4j-api" % slf4jVersion
val slf4jSimpleArtifact = "org.slf4j" % "slf4j-simple" % slf4jVersion
lazy val publishSettings = Seq(
sonatypeProfileName := "com.krux",
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
pgpSecretRing := file("secring.gpg"),
pgpPublicRing := file("pubring.gpg"),
publishTo := {
if (isSnapshot.value)
Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
else
Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
},
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
homepage := Some(url("https://github.com/krux/stubborn")),
scmInfo := Some(
ScmInfo(
url("https://github.com/krux/stubborn"),
"scm:git:[email protected]:krux/stubborn.git"
)
),
developers := List(
Developer(id = "realstraw", name = "Kexin Xie", email = "[email protected]", url = url("http://github.com/realstraw")),
Developer(id = "sethyates", name = "Seth Yates", email = "[email protected]", url = url("http://github.com/sethyates"))
)
)
lazy val noPublishSettings = Seq(
publishArtifact := false,
publish := {},
publishLocal := {},
publishTo := None
)
lazy val commonSettings = Seq(
scalacOptions ++= Seq("-deprecation", "-feature", "-Xlint", "-Xfatal-warnings"),
scalaVersion := scala212Version,
crossScalaVersions := Seq(scala212Version, scala213Version),
libraryDependencies += scalaTestArtifact,
organization := "com.krux"
)
lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(publishSettings: _*).
settings(
name := "stubborn",
libraryDependencies += slf4jApiArtifact
)
lazy val examples = (project in file("examples")).
settings(commonSettings: _*).
settings(noPublishSettings: _*).
settings(
name := "stubborn-examples",
libraryDependencies += slf4jSimpleArtifact
).
dependsOn(root)