-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
62 lines (49 loc) · 2.31 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
import sbtghactions.JavaSpec.Distribution.Zulu
name := "jackson-scala-reflect-extensions"
organization := "com.github.pjfanning"
description := "Extension to jackson-module-scala that uses scala-reflect to get type info"
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.18", "2.13.12")
val jacksonVersion = "2.16.0"
//resolvers ++= Resolver.sonatypeOssRepos("snapshots")
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion,
"org.slf4j" % "slf4j-api" % "2.0.9",
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"org.slf4j" % "slf4j-simple" % "2.0.9" % Test,
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-csv" % jacksonVersion % Test
)
// build.properties
Compile / resourceGenerators += Def.task {
val file = (Compile / resourceManaged).value / "com" / "github" / "pjfanning" / "jackson" / "reflect" / "build.properties"
val contents = "version=%s\ngroupId=%s\nartifactId=%s\n".format(version.value, organization.value, name.value)
IO.write(file, contents)
Seq(file)
}.taskValue
homepage := Some(url("https://github.com/pjfanning/jackson-scala-reflect-extensions"))
licenses := Seq("APL2" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt"))
developers := List(
Developer(id="pjfanning", name="PJ Fanning", email="", url=url("https://github.com/pjfanning"))
)
Test / parallelExecution := false
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test")))
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"
)
)
)