-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.sbt
82 lines (70 loc) · 2.32 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
lazy val `sbt-multi-jvm` = project in file(".")
homepage := Some(url("https://github.com/sbt/sbt-multi-jvm"))
// Sanity-check: assert that version comes from a tag (e.g. not a too-shallow clone)
// https://github.com/dwijnand/sbt-dynver/#sanity-checking-the-version
Global / onLoad := (Global / onLoad).value.andThen { s =>
dynverAssertTagVersion.value
s
}
lazy val scala212 = "2.12.20"
ThisBuild / crossScalaVersions := Seq(scala212)
ThisBuild / scalaVersion := scala212
organization := "com.github.sbt"
name := "sbt-multi-jvm"
enablePlugins(SbtPlugin)
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.9.7" // set minimum sbt version
}
}
// dependencies
libraryDependencies += Defaults.sbtPluginExtra(
"com.eed3si9n" % "sbt-assembly" % "2.3.0",
(pluginCrossBuild / sbtBinaryVersion).value,
(pluginCrossBuild / scalaBinaryVersion).value
)
// compile settings
scalacOptions ++= List(
"-unchecked",
"-deprecation",
"-language:_",
"-encoding",
"UTF-8",
"-opt-inline-from:<sources>",
"-opt:l:inline"
)
// publish settings
licenses += "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")
developers += Developer(
"sbt-multi-jvm ",
"Sbt Multi-JVM Contributors",
"",
url("https://github.com/sbt/sbt-multi-jvm/graphs/contributors")
)
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(
RefPredicate.StartsWith(Ref.Tag("v")),
RefPredicate.Equals(Ref.Branch("main"))
)
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 }}"
)
)
)
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest")
ThisBuild / githubWorkflowJavaVersions := Seq(
JavaSpec.temurin("8"),
JavaSpec.temurin("11"),
JavaSpec.temurin("17"),
JavaSpec.temurin("21")
)
ThisBuild / githubWorkflowBuildMatrixExclusions += MatrixExclude(Map("java" -> "temurin@8", "os" -> "macos-latest"))