-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
81 lines (72 loc) · 2.47 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
ThisBuild / organization := Organization.organization
ThisBuild / organizationName := Organization.organizationName
ThisBuild / organizationHomepage := Organization.organizationHomepage
val scala212 = "2.12.20"
ThisBuild / scalaVersion := scala212
ThisBuild / crossScalaVersions := Seq(scala212)
ThisBuild / homepage := Project.homepage
ThisBuild / developers := Project.developers
ThisBuild / licenses := Project.licenses
ThisBuild / scmInfo := Project.scmInfo
ThisBuild / description := Project.description
lazy val root = (project in file("."))
.enablePlugins(ScriptedPlugin, BuildInfoPlugin)
.settings(
name := "sbt-sbom",
sbtPlugin := true,
libraryDependencies ++= Dependencies.library,
buildInfoPackage := "com.github.sbt.sbom",
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++ Seq(
"-Xmx1024M",
"-Dplugin.version=" + version.value,
"-Dplugin.organization=" + organization.value
)
},
scriptedBufferLog := false,
scriptedSbt := "1.5.2",
)
ThisBuild / pomIncludeRepository := { _ =>
false
}
ThisBuild / publishMavenStyle := true
ThisBuild / githubWorkflowBuildPreamble := Seq(
WorkflowStep.Sbt(List("scalafixAll --check"), name = Some("Linter: Scalafix checks"))
)
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")
)
ThisBuild / githubWorkflowBuildMatrixExclusions += MatrixExclude(Map("java" -> "temurin@8", "os" -> "macos-latest"))
// scalafix specific settings
inThisBuild(
List(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalafixScalaBinaryVersion := scalaBinaryVersion.value,
scalacOptions ++= Seq(
"-Ywarn-unused"
)
)
)