-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
87 lines (76 loc) · 2.81 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
import xerial.sbt.Sonatype._
lazy val V = _root_.scalafix.sbt.BuildInfo
val Scala212Version = "2.12.19"
val Scala213Version = "2.13.13"
val Scala3Version = "3.3.3"
inThisBuild(
List(
organization := "org.virtuslab",
homepage := Some(url("https://github.com/VirtusLabRnD/scalafix-migrate-zio-macros")),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer("WojciechMazur", "Wojciech Mazur", "[email protected]", url("https://github.com/WojciechMazur"))
),
version := "0.1.0",
scalaVersion := Scala213Version,
semanticdbEnabled := true,
semanticdbIncludeInJar := true,
semanticdbVersion := scalafixSemanticdb.revision,
versionScheme := Some("early-semver")
)
)
Global / PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray())
// Global / PgpKeys.pgpSigningKey := Some("BCE7DB09E1B2687C9C9C3AB2D8DF100359D36CBF")
Global / publishTo := sonatypePublishToBundle.value
Global / credentials ++= (
for {
username <- sys.env.get("SONATYPE_USER")
password <- sys.env.get("SONATYPE_PW")
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
).toList
Global / scmInfo := Some(
ScmInfo(
url("https://github.com/VirtusLabRnD/scalafix-migrate-zio-macros"),
"scm:[email protected]:VirtusLabRnD/scalafix-migrate-zio-macros.git"
)
)
lazy val rules = project.settings(
moduleName := "scalafix-migrate-zio-macros",
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion,
crossScalaVersions := Seq(Scala212Version, Scala213Version)
)
val ZIOVersion = "2.0.21"
val ZIOMockVersion = "1.0.0-RC11"
lazy val commonTestDependencies = List(
"dev.zio" %% "zio" % ZIOVersion,
"dev.zio" %% "zio-managed" % ZIOVersion,
"dev.zio" %% "zio-mock" % ZIOMockVersion,
)
lazy val input = project.settings(
(publish / skip) := true,
scalaVersion := Scala213Version,
scalacOptions ++= Seq(
"-Ymacro-annotations"
),
libraryDependencies ++= commonTestDependencies ++ Seq(
"dev.zio" %% "zio-macros" % ZIOVersion,
)
)
lazy val output = project.settings(
(publish / skip) := true,
scalaVersion := Scala3Version,
libraryDependencies ++= commonTestDependencies
)
lazy val tests = project
.settings(
crossScalaVersions := Seq(Scala212Version, Scala213Version),
(publish / skip) := true,
libraryDependencies += "ch.epfl.scala" % "scalafix-testkit" % V.scalafixVersion % Test cross CrossVersion.full,
scalafixTestkitOutputSourceDirectories := (output / Compile / unmanagedSourceDirectories).value,
scalafixTestkitInputSourceDirectories := (input / Compile / unmanagedSourceDirectories).value,
scalafixTestkitInputClasspath := (input / Compile / fullClasspath).value
)
.dependsOn(rules)
.enablePlugins(ScalafixTestkitPlugin)