-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.sbt
More file actions
75 lines (71 loc) · 2.57 KB
/
build.sbt
File metadata and controls
75 lines (71 loc) · 2.57 KB
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
import ReleaseTransformations._
val scalaTestVersion = "3.2.20"
lazy val beanPuree = (project in file ("."))
.settings(
name := "beanpuree",
scalaVersion := "2.13.18",
crossScalaVersions := Seq("2.11.12", "2.12.21", "2.13.18"),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"),
organization := "me.limansky",
incOptions := incOptions.value.withLogRecompileOnMacro(false),
libraryDependencies += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) => "com.chuusai" %% "shapeless" % "2.3.11"
case _ => "com.chuusai" %% "shapeless" % "2.3.13"
}
},
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Provided,
"org.scalatest" %% "scalatest-core" % scalaTestVersion % Test,
"org.scalatest" %% "scalatest-shouldmatchers" % scalaTestVersion % Test,
"org.scalatest" %% "scalatest-flatspec" % scalaTestVersion % Test
) ++ {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, x)) if x == 11 || x == 12 => Seq(
compilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch)
)
case Some((2, 13)) => Seq.empty
case _ => sys.error("Unsupported Scala version")
}
},
publishSettings,
releaseSettings
)
lazy val publishSettings = Seq(
licenses += ("Apache 2.0 License", url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("http://github.com/limansky/beanpuree")),
publishMavenStyle := true,
Test / publishArtifact := false,
scmInfo := Some(
ScmInfo(
url("https://github.com/limansky/beanpuree"),
"scm:git:git@github.com/limansky/beanpuree.git"
)
),
publishTo := {
if (isSnapshot.value) Some(Resolver.sonatypeCentralSnapshots)
else localStaging.value
},
developers := List(
Developer("limansky", "Mike Limansky", "mike.limansky@gmail.com", url("http://github.com/limansky"))
)
)
lazy val releaseSettings = Seq(
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepCommand("sonaRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
)