forked from davegurnell/bridges
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
100 lines (78 loc) · 2.61 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
enablePlugins(GitVersioning)
enablePlugins(GitBranchPrompt)
// Basic settings -------------------------------
organization := "com.davegurnell"
name := "bridges"
ThisBuild / scalaVersion := "2.13.7"
ThisBuild / crossScalaVersions := Seq("2.13.7", "2.12.16")
ThisBuild / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) =>
Seq(
"-feature",
"-unchecked",
"-deprecation",
"-Xfatal-warnings",
"-Ypartial-unification"
)
case Some((2, _)) =>
Seq(
"-feature",
"-unchecked",
"-deprecation",
"-Xfatal-warnings",
)
case _ =>
Seq(
"-feature",
"-unchecked",
"-deprecation",
"-rewrite",
"-new-syntax",
)
}
}
ThisBuild / libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.9",
"com.davegurnell" %% "unindent" % "1.8.0",
"org.apache.commons" % "commons-text" % "1.9",
"org.scalatest" %% "scalatest" % "3.2.13" % Test,
"eu.timepit" %% "refined" % "0.9.29" % Provided,
"eu.timepit" %% "refined-shapeless" % "0.9.29" % Provided
)
// Versioning -----------------------------------
ThisBuild / versionScheme := Some("early-semver")
git.gitUncommittedChanges := git.gitCurrentTags.value.isEmpty // Put "-SNAPSHOT" on a commit if it's not a tag
// Github Actions -------------------------------
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]")
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ci-release"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)
// Publishing -----------------------------------
usePgpKeyHex("2D2E2B8B8BBA48B5")
ThisBuild / licenses += ("Apache-2.0", url("http://apache.org/licenses/LICENSE-2.0"))
ThisBuild / homepage := Some(url("https://github.com/davegurnell/bridges"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/davegurnell/bridges.git"),
"scm:[email protected]:davegurnell/bridges.git"
)
)
ThisBuild / developers := List(
Developer(
id = "davegurnell",
name = "Dave Gurnell",
email = "[email protected]",
url = url("https://twitter.com/davegurnell")
)
)