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 3
/
Copy pathbuild.sbt
138 lines (122 loc) · 4.01 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import Settings._
import scala.Console._
shellPrompt.in(ThisBuild) := (state => s"${CYAN}project:$GREEN${Project.extract(state).currentRef.project}$RESET> ")
lazy val displayJavaVersion = taskKey[Unit]("Displays Java version")
displayJavaVersion := { println(s"Running sbt with Java ${System.getProperty("java.version")}") }
lazy val commonSettings = Vector(
organization := "io.rdbc",
organizationName := "rdbc contributors",
scalaVersion := "2.12.7",
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")),
scmInfo := Some(
ScmInfo(
url("https://github.com/rdbc-io/rdbc"),
"scm:[email protected]:rdbc-io/rdbc.git"
)
),
buildInfoKeys := Vector(version, scalaVersion, git.gitHeadCommit, BuildInfoKey.action("buildTime") {
java.time.Instant.now()
}),
scalastyleFailOnError := true
) ++ compilationConf ++ scaladocConf ++ developersConf ++ publishConf
lazy val rdbcRoot = (project in file("."))
.settings(commonSettings: _*)
.settings(
publishArtifact := false
)
.aggregate(rdbcApiScala, rdbcApiJava, rdbcImplBase, rdbcUtil, rdbcTck, rdbcJavaAdapter)
lazy val rdbcApiScala = (project in file("rdbc-api-scala"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "rdbc-api-scala",
libraryDependencies ++= Vector(
Library.reactiveStreams,
Library.scalatest % Test,
Library.scalamock % Test
),
scalacOptions in(Compile, doc) ++= Vector(
"-doc-title", "rdbc API"
),
buildInfoPackage := "io.rdbc.sapi"
)
lazy val rdbcApiJava = (project in file("rdbc-api-java"))
.settings(commonSettings: _*)
.settings(
name := "rdbc-api-java",
crossPaths := false,
autoScalaLibrary := false,
crossScalaVersions := Vector.empty,
libraryDependencies ++= Vector(
Library.reactiveStreams,
Library.immutables % Provided
),
coverageEnabled := false,
publishArtifact := {
scalaVersion.value.startsWith("2.12")
}
)
lazy val rdbcJavaAdapter = (project in file("rdbc-java-adapter"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "rdbc-java-adapter",
libraryDependencies ++= Vector(
Library.java8Compat
),
buildInfoPackage := "io.rdbc.jadapter",
).dependsOn(rdbcApiJava, rdbcApiScala, rdbcUtil)
lazy val rdbcImplBase = (project in file("rdbc-implbase"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "rdbc-implbase",
libraryDependencies ++= Vector(
Library.scalatest % Test,
Library.scalamock % Test,
Library.reactiveStreamsTck % Test,
Library.akkaStream % Test
),
buildInfoPackage := "io.rdbc.implbase"
).dependsOn(rdbcApiScala, rdbcUtil)
lazy val rdbcUtil = (project in file("rdbc-util"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "rdbc-util",
libraryDependencies ++= Vector(
Library.sourcecode,
Library.scalaLogging,
Library.scalatest % Test,
Library.scalamock % Test
),
buildInfoPackage := "io.rdbc.util"
)
lazy val rdbcTck = (project in file("rdbc-tck"))
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(
name := "rdbc-tck",
libraryDependencies ++= Vector(
Library.scalactic,
Library.scalatest,
Library.reactiveStreamsTck,
Library.akkaStream
),
buildInfoPackage := "io.rdbc.tck",
scalacOptions -= "-Ywarn-value-discard"
).dependsOn(rdbcApiScala)
lazy val rdbcDoc = (project in file("rdbc-doc"))
.enablePlugins(TemplateReplace)
.settings(
publishArtifact := false,
mkdocsVariables := Map(
"version" -> version.value,
"scaladocRoot" -> ("https://javadoc.io/page/" + organization.in(rdbcApiScala).value + "/" + name.in(rdbcApiScala).value + "_2.12/" + version.value)
)
)