This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
103 lines (91 loc) · 2.91 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
import Settings._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
import scala.Console._
shellPrompt.in(ThisBuild) := (state => s"${CYAN}project:$GREEN${Project.extract(state).currentRef.project}$RESET> ")
lazy val commonSettings = Vector(
organization := "io.rdbc.pgsql",
organizationName := "rdbc contributors",
scalaVersion := "2.12.6",
crossScalaVersions := Vector(scalaVersion.value, "2.11.12"),
licenses := Vector(
"Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")
),
startYear := Some(Copyright.startYear),
homepage := Some(url("https://github.com/rdbc-io/rdbc-pgsql")),
scmInfo := Some(
ScmInfo(
url("https://github.com/rdbc-io/rdbc-pgsql"),
"scm:[email protected]:rdbc-io/rdbc-pgsql.git"
)
),
buildInfoKeys := Vector(version, scalaVersion, git.gitHeadCommit, BuildInfoKey.action("buildTime") {
java.time.Instant.now()
}),
scalastyleFailOnError := true
) ++ compilationConf ++ scaladocConf ++ developersConf ++ publishConf ++ testConf
lazy val rdbcPgsql = (project in file("."))
.settings(commonSettings: _*)
.settings(
publishArtifact := false
)
.aggregate(core, nettyTransport, bench)
lazy val core = (project in file("rdbc-pgsql-core"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "pgsql-core",
libraryDependencies ++= Vector(
Library.rdbcScalaApi,
Library.rdbcJavaApi,
Library.rdbcImplbase,
Library.rdbcUtil,
Library.scalaLogging,
Library.sourcecode,
Library.scodecCore,
Library.scodecBits,
Library.stm,
Library.immutables % Provided,
Library.logback % Test,
Library.scalatest % Test,
Library.reactiveStreamsTck % Test,
),
buildInfoPackage := "io.rdbc.pgsql.core"
)
lazy val nettyTransport = (project in file("rdbc-pgsql-transport-netty"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "pgsql-transport-netty",
libraryDependencies ++= Vector(
Library.rdbcJavaApi,
Library.nettyHandler,
Library.rdbcUtil,
Library.rdbcJavaAdapter,
Library.scalaLogging,
Library.immutables % Provided,
Library.logback % Test,
Library.rdbcTck % Test,
Library.scalatest % Test,
Library.pgsql % Test
),
buildInfoPackage := "io.rdbc.pgsql.transport.netty"
).dependsOn(core)
lazy val doc = (project in file("rdbc-pgsql-doc"))
.enablePlugins(TemplateReplace)
.settings(
publishArtifact := false,
mkdocsVariables := Map(
"version" -> version.value,
"rdbc_version" -> Library.rdbcScalaApi.revision
)
)
lazy val bench = (project in file("rdbc-pgsql-bench"))
.enablePlugins(JmhPlugin)
.settings(commonSettings: _*)
.settings(
name := "pgsql-bench",
publishArtifact := false,
libraryDependencies ++= Vector(
Library.pgsqljdbc
)
).dependsOn(core, nettyTransport)