-
Notifications
You must be signed in to change notification settings - Fork 46
/
build.sbt
88 lines (82 loc) · 2.88 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
import sbt._
import sbt.Keys._
import scalariform.formatter.preferences._
def testContainerVersion = "1.15.2"
lazy val `slick-joda-mapper` = project.in(file("."))
.settings(scalariformSettings)
.settings(publishingSettings)
.settings(
name := "slick-joda-mapper",
organization := "com.github.tototoshi",
version := "2.9.1",
crossScalaVersions := Seq("2.12.20", "2.13.15", "3.3.4"),
scalaVersion := "2.13.15",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-language:reflectiveCalls",
"-language:implicitConversions",
),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
Seq("-Xsource:3")
case _ =>
Nil
}
},
libraryDependencies ++= Seq(
"joda-time" % "joda-time" % "2.12.7" % "provided",
"org.joda" % "joda-convert" % "2.2.3" % "provided",
"com.h2database" % "h2" % "2.2.224" % "test",
"com.dimafeng" %% "testcontainers-scala" % "0.41.4" % "test",
"com.mysql" % "mysql-connector-j" % "9.1.0" % "test",
"org.postgresql" % "postgresql" % "42.7.4" % "test",
"org.testcontainers" % "mysql" % testContainerVersion % "test",
"org.testcontainers" % "postgresql" % testContainerVersion % "test",
"org.slf4j" % "slf4j-simple" % "2.0.16" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"com.typesafe.slick" %% "slick" % "3.5.2" % "provided",
),
initialCommands += """
import org.joda.time._
import java.sql._
"""
)
lazy val scalariformSettings = Seq(
scalariformPreferences := scalariformPreferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(DanglingCloseParenthesis, Preserve)
)
lazy val publishingSettings = Seq(
publishMavenStyle := true,
publishTo := _publishTo(version.value),
Test / publishArtifact := false,
pomExtra := _pomExtra
)
def _publishTo(v: String) = {
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
lazy val _pomExtra =
<url>https://github.com/tototoshi/slick-joda-mapper</url>
<licenses>
<license>
<name>Two-clause BSD-style license</name>
<url>https://github.com/tototoshi/slick-joda-mapper/blob/master/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:tototoshi/slick-joda-mapper.git</url>
<connection>scm:git:[email protected]:tototoshi/slick-joda-mapper.git</connection>
</scm>
<developers>
<developer>
<id>tototoshi</id>
<name>Toshiyuki Takahashi</name>
<url>https://tototoshi.github.com</url>
</developer>
</developers>