-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
77 lines (69 loc) · 2.24 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
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
import com.typesafe.sbt.SbtScalariform._
import scalariform.formatter.preferences._
import scoverage.ScoverageKeys._
inThisBuild(List(
organization := "co.blocke",
homepage := Some(url("https://github.com/gzoller/listzipper")),
licenses := List("MIT" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
"gzoller",
"Greg Zoller",
url("http://www.blocke.co")
)
),
coverageMinimumStmtTotal := 92,
coverageFailOnMinimum := true,
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignArguments, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentConstructorArguments, true),
))
name := "listzipper"
ThisBuild / scalaVersion := "3.3.0"
ThisBuild / organization := "co.blocke"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.17" % "test"
lazy val root = project
.in(file("."))
.settings(
name := "listzipper",
crossScalaVersions := Seq("2.13.12") :+ scalaVersion.value,
libraryDependencies ++= Seq(scalatest)
)
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"))
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "windows-latest")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
RefPredicate.Equals(Ref.Branch("main")),
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 }}",
"CI_SNAPSHOT_RELEASE" -> "+publishSigned"
)
)
)
//==========================
// Settings
//==========================
lazy val settings = Seq(
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
scalacOptions ++= compilerOptions,
testFrameworks += new TestFramework("munit.Framework")
)
lazy val compilerOptions = Seq(
"-unchecked",
"-feature",
"-language:implicitConversions",
"-deprecation",
"-encoding",
"utf8"
)