-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sbt
93 lines (84 loc) · 2.7 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
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
import scoverage.ScoverageKeys._
lazy val isCI = sys.env.get("CI").contains("true")
inThisBuild(List(
organization := "co.blocke",
homepage := Some(url("https://github.com/gzoller/ScalaJack")),
licenses := List("MIT" -> url("https://opensource.org/licenses/MIT")),
developers := List(
Developer(
"gzoller",
"Greg Zoller",
"gzoller@blocke.co",
url("http://www.blocke.co")
)
)
//coverageMinimumStmtTotal := 92,
//coverageFailOnMinimum := true
))
name := "scalajack"
ThisBuild / organization := "co.blocke"
ThisBuild / scalaVersion := "3.4.2"
ThisBuild / githubWorkflowScalaVersions := Seq("3.4.2")
lazy val root = project
.in(file("."))
.settings(settings)
.settings(
name := "serializer",
Compile / packageBin / mappings += {
(baseDirectory.value / "plugin.properties") -> "plugin.properties"
},
doc := null, // disable dottydoc for now
Compile / doc / sources := Seq(),
//sources in (Compile, doc) := Seq(),
Test / parallelExecution := false,
scalafmtOnCompile := !isCI,
libraryDependencies ++= Seq(
"co.blocke" %% "scala-reflection" % "2.0.8",
"org.apache.commons" % "commons-text" % "1.11.0",
"io.github.kitlangton" %% "neotype" % "0.0.9",
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"org.json4s" %% "json4s-core" % "4.0.6" % Test,
"org.json4s" %% "json4s-native" % "4.0.6" % Test
)
)
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "21"))
ThisBuild / githubWorkflowOSes := Seq("ubuntu-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
)
lazy val compilerOptions = Seq(
"-unchecked",
"-feature",
"-language:implicitConversions",
"-deprecation",
// "-explain",'
"-coverage-exclude-files",
".*SJConfig.*",
"-coverage-exclude-classlikes",
".*internal.*",
"-coverage-exclude-classlikes",
".*AnyWriter",
"-encoding",
"utf8"
)