This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
forked from vinograt/postgresql-async
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
120 lines (112 loc) · 4.06 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
val commonName = "db-async-common"
val postgresqlName = "postgresql-async"
lazy val root = (project in file("."))
.withId("db-async")
.settings(
baseSettings,
publish := Unit,
publishLocal := Unit,
publishArtifact := false
)
.aggregate(common, postgresql)
lazy val common = (project in file(commonName))
.withId(commonName)
.settings(
baseSettings,
name := commonName,
libraryDependencies ++= commonDependencies
)
lazy val postgresql = (project in file(postgresqlName))
.withId(postgresqlName)
.settings(
baseSettings,
name := postgresqlName,
libraryDependencies ++= implementationDependencies
)
.dependsOn(common)
val commonVersion = "0.3.10"
val specs2Version = "4.5.1"
val specs2Dependency = "org.specs2" %% "specs2-core" % specs2Version % "test"
val specs2JunitDependency = "org.specs2" %% "specs2-junit" % specs2Version % "test"
val specs2MockDependency = "org.specs2" %% "specs2-mock" % specs2Version % "test"
val logbackDependency = "ch.qos.logback" % "logback-classic" % "1.2.3" % "test"
val commonDependencies = Seq(
"org.slf4j" % "slf4j-api" % "1.7.30",
"joda-time" % "joda-time" % "2.10.10",
"org.joda" % "joda-convert" % "2.2.1",
"io.netty" % "netty-all" % "4.1.63.Final",
"org.javassist" % "javassist" % "3.28.0-GA",
specs2Dependency,
specs2JunitDependency,
specs2MockDependency,
logbackDependency
)
val implementationDependencies = Seq(
specs2Dependency,
logbackDependency
)
lazy val baseSettings = Seq(
scalaVersion := "2.12.13",
scalacOptions :=
Opts.compile.encoding("UTF8")
:+ Opts.compile.deprecation
:+ Opts.compile.unchecked
:+ "-feature"
:+ "-language:postfixOps",
Test / testOptions += Tests.Argument(TestFrameworks.Specs2, "sequential"),
doc / scalacOptions := Seq(
"-doc-external-doc:scala=http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/"),
javacOptions := Seq("-source", "1.6", "-target", "1.6", "-encoding", "UTF8"),
version := commonVersion,
parallelExecution := false,
Test / publishArtifact := false,
Test / fork := true,
Test / baseDirectory := file("."),
sonatypeProfileName := "com.github.dealermade",
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
resolvers += "Sonatype OSS Release" at "https://oss.sonatype.org/content/repositories/releases",
resolvers += "Sonatype Snapshot" at "https://oss.sonatype.org/content/repositories/snapshots",
credentials += {
Seq("SONATYPE_USER", "SONATYPE_PASS") map sys.env.get match {
case Seq(Some(user), Some(pass)) ⇒
Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass)
case _ ⇒
Credentials(Path.userHome / ".sbt" / ".sonatype_credentials")
}
},
useGpg := false,
usePgpKeyHex("1037EE8F929780E1"),
pgpPublicRing := baseDirectory.value / ".." / "project" / ".gnupg" / "pubring.gpg",
pgpSecretRing := baseDirectory.value / ".." / "project" / ".gnupg" / "secring.gpg",
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toArray),
ThisBuild / organization := "com.github.dealermade",
ThisBuild / organizationName := "Dealermade",
ThisBuild / organizationHomepage := Some(url("https://github.com/Dealermade")),
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/Dealermade/postgresql-async"),
"scm:git@github.com:Dealermade/postgresql-async.git"
)
),
ThisBuild / developers := List(
Developer(
id = "alexbezhan",
name = "Alex Bezhan",
email = "alex@dealermade.com",
url = url("https://github.com/alexbezhan")
)
),
ThisBuild / description := "Async, Netty based, database driver for PostgreSQL written in Scala",
ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")),
ThisBuild / homepage := Some(url("https://github.com/example/project")),
// Remove all additional repository other than Maven Central from POM
ThisBuild / pomIncludeRepository := { _ =>
false
},
ThisBuild / publishMavenStyle := true
)