forked from sangria-graphql/sangria-play-json
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
102 lines (94 loc) · 3.5 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
101
102
import PlayAxis._
val scala212 = "2.12.19"
val scala213 = "2.13.13"
val scala3 = "3.3.3"
ThisBuild / organization := "org.sangria-graphql"
ThisBuild / mimaPreviousArtifacts := Set()
ThisBuild / scalaVersion := scala3
ThisBuild / description := "Sangria play-json marshalling"
ThisBuild / homepage := Some(url("https://sangria-graphql.github.io/"))
ThisBuild / licenses := Seq(
"Apache License, ASL Version 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / githubWorkflowPublishTargetBranches := List()
ThisBuild / githubWorkflowBuildPreamble ++= List(
WorkflowStep.Sbt(List("mimaReportBinaryIssues"), name = Some("Check binary compatibility")),
WorkflowStep.Sbt(List("scalafmtCheckAll"), name = Some("Check formatting"))
)
// Publishing
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
ThisBuild / githubWorkflowScalaVersions := Seq(scala212, scala213, scala3)
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 }}"
)
)
)
ThisBuild / startYear := Some(2016)
ThisBuild / organizationHomepage := Some(url("https://github.com/sangria-graphql"))
ThisBuild / developers := Developer(
"OlegIlyenko",
"Oleg Ilyenko",
"",
url("https://github.com/OlegIlyenko")) :: Nil
ThisBuild / scmInfo := Some(
ScmInfo(
browseUrl = url("https://github.com/sangria-graphql/sangria-play-json"),
connection = "scm:git:[email protected]:sangria-graphql/sangria-play-json.git"))
// nice *magenta* prompt!
ThisBuild / shellPrompt := { state =>
scala.Console.MAGENTA + Project.extract(state).currentRef.project + "> " + scala.Console.RESET
}
publish / skip := true
publishLocal / skip := true
lazy val sangriaPlayJson = (projectMatrix in file("sangria-play-json"))
.settings(
name := "sangria-play-json",
scalacOptions ++= Seq("-deprecation", "-feature"),
mimaPreviousArtifacts := Set("org.sangria-graphql" %% "sangria-play-json" % "2.0.2"),
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oFD"),
libraryDependencies ++= Seq(
"org.sangria-graphql" %% "sangria-marshalling-api" % "1.0.8",
"org.sangria-graphql" %% "sangria-marshalling-testkit" % "1.0.4" % Test,
"org.scalatest" %% "scalatest" % "3.2.18" % Test
)
)
.customRow(
scalaVersions = Seq(scala212, scala213),
axisValues = Seq(play28, VirtualAxis.jvm),
_.settings(
moduleName := name.value + "-play28",
javacOptions ++= Seq("-source", "8", "-target", "8"),
scalacOptions ++= Seq("-target:jvm-1.8"),
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.8.2",
)
)
)
.customRow(
scalaVersions = Seq(scala213, scala3),
axisValues = Seq(play29, VirtualAxis.jvm),
_.settings(
moduleName := name.value + "-play29",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.10.4",
)
)
)
.customRow(
scalaVersions = Seq(scala213, scala3),
axisValues = Seq(play30, VirtualAxis.jvm),
_.settings(
moduleName := name.value + "-play30",
libraryDependencies ++= Seq(
"org.playframework" %% "play-json" % "3.0.2",
)
)
)