-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
108 lines (98 loc) · 3.91 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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-circe-generic-extras")),
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.2.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-circe-generic-extras"),
"scm:[email protected]:VirtusLabRnD/scalafix-migrate-circe-generic-extras.git"
)
)
lazy val rules = project.settings(
moduleName := "scalafix-migrate-circe-generic-extras",
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion,
crossScalaVersions := Seq(Scala212Version, Scala213Version)
)
// Dependencies mostly used to check compilation of circe-generic sources
val circeVersion = "0.14.7"
val circeGenericExtrasVersion = "0.14.3"
val circeDerivationVersion = "0.13.0-M5"
val jawnVersion = "1.5.1"
val munitVersion = "0.7.29"
val disciplineMunitVersion = "1.0.9"
val enumeratumVersion = "1.7.3"
lazy val commonTestDependencies = List(
// used in examples
"com.beachape" %% "enumeratum" % enumeratumVersion,
"com.beachape" %% "enumeratum-circe" % enumeratumVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-literal" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
// Used by circe-generic-extra tests
"io.circe" %% "circe-testing" % circeVersion,
"org.scalameta" %% "munit" % munitVersion,
"org.scalameta" %% "munit-scalacheck" % munitVersion,
"org.typelevel" %% "discipline-munit" % disciplineMunitVersion,
"org.typelevel" %% "jawn-parser" % jawnVersion
)
lazy val input = project.settings(
(publish / skip) := true,
scalaVersion := Scala213Version,
scalacOptions ++= Seq(
"-Ymacro-annotations"
),
libraryDependencySchemes ++= Seq(
"io.circe" %% "circe-core" % VersionScheme.Always // See https://github.com/circe/circe-derivation/issues/346
),
libraryDependencies ++= commonTestDependencies ++ Seq(
"io.circe" %% "circe-derivation" % circeDerivationVersion,
"io.circe" %% "circe-derivation-annotations" % circeDerivationVersion,
"io.circe" %% "circe-generic-extras" % circeGenericExtrasVersion
)
)
lazy val output = project.settings(
(publish / skip) := true,
scalaVersion := Scala3Version,
libraryDependencies ++= commonTestDependencies ++ Seq(
"io.circe" %% "circe-generic" % circeVersion
)
)
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)