-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sbt
75 lines (67 loc) · 2.57 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
inThisBuild(Seq(
organization := "com.github.ghik",
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq(
"3.6.2",
"3.5.2", "3.5.1", "3.5.0",
"3.4.3", "3.4.2", "3.4.1", "3.4.0",
"3.3.4", "3.3.3", "3.3.2", "3.3.1", "3.3.0",
"3.2.2", "3.2.1",
"2.13.10", "2.13.11", "2.13.12", "2.13.13", "2.13.14", "2.13.15",
"2.12.17", "2.12.18", "2.12.19", "2.12.20"
),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17")),
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
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 }}"
)
)),
))
lazy val zerowaste = project.in(file("."))
.settings(
libraryDependencies ++= Seq(
if (scalaBinaryVersion.value == "3")
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value
else
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scalatest" %% "scalatest-funsuite" % "3.2.13" % Test,
"org.typelevel" %% "cats-effect" % "3.4.1" % Test,
),
Compile / resourceDirectory := {
val base = (Compile / resourceDirectory).value
if (scalaBinaryVersion.value == "3")
base.getParentFile / s"${base.name}-3"
else
base.getParentFile / s"${base.name}-2"
},
Test / fork := true,
projectInfo := ModuleInfo(
nameFormal = "Purifier",
description = "Scala compiler plugin that disallows discarding of non-Unit expressions",
homepage = Some(url("https://github.com/ghik/zerowaste")),
startYear = Some(2022),
licenses = Vector(
"The MIT License" -> url("https://opensource.org/licenses/MIT")
),
organizationName = "ghik",
organizationHomepage = Some(url("https://github.com/ghik")),
scmInfo = Some(ScmInfo(
browseUrl = url("https://github.com/ghik/zerowaste.git"),
connection = "scm:git:[email protected]:ghik/zerowaste.git",
devConnection = Some("scm:git:[email protected]:ghik/zerowaste.git")
)),
developers = Vector(
Developer("ghik", "Roman Janusz", "[email protected]", url("https://github.com/ghik"))
),
),
crossVersion := CrossVersion.full,
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
publishTo := sonatypePublishToBundle.value,
)