-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
81 lines (70 loc) · 1.9 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
organization := "com.github.sbt"
name := "sbt-jdi-tools"
enablePlugins(SbtPlugin)
licenses += (
"Apache-2.0",
url("https://www.apache.org/licenses/LICENSE-2.0.html")
)
homepage := Some(url("https://github.com/sbt/sbt-jdi-tools"))
developers := List(
Developer(
"senkwich",
"Chip Senkbeil",
url("http://www.chipsenkbeil.org")
),
Developer(
"adpi2",
"Adrien Piquerez",
url("https://github.com/adpi2/")
)
)
val scala212 = "2.12.20"
val scala3 = "3.3.4"
scalaVersion := scala212
crossScalaVersions := Seq(scala212, scala3)
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" =>
"1.5.8"
case _ =>
"2.0.0-M2"
}
}
scalacOptions ++= Seq(
"-encoding", "UTF-8",
"-deprecation", "-unchecked", "-feature",
"-Xfatal-warnings"
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq("-target:jvm-1.8")
case _ => Nil
})
javacOptions ++= Seq(
"-source", "1.8", "-target", "1.8", "-Xlint:all", "-Werror",
"-Xlint:-options", "-Xlint:-path", "-Xlint:-processing"
)
Compile / doc / scalacOptions ++= Seq(
"-no-link-warnings" // Suppress problems with Scaladoc @throws links
)
// Properly handle Scaladoc mappings
autoAPIMappings := true
// Prevent publishing test artifacts
Test / publishArtifact := false
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(
RefPredicate.StartsWith(Ref.Tag("v"))
)
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
commands = List("ci-release"),
name = Some("Publish project"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)