-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
115 lines (105 loc) · 3.38 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
109
110
111
112
113
114
115
lazy val V = _root_.scalafix.sbt.BuildInfo
lazy val rulesCrossVersions = Seq(V.scala213, V.scala212)
lazy val scala3Version = "3.3.4"
inThisBuild(
List(
organization := "no.arktekk",
organizationName := "Arktekk",
tlBaseVersion := "0.1",
homepage := Some(url("https://github.com/arktekk/scala3-scalafix")),
licenses := List(License.Apache2),
tlBaseVersion := "0.1",
startYear := Some(2022),
developers := List(
Developer(
"ingarabr",
"Ingar Abrahamsen",
url("https://github.com/ingarabr")
),
Developer(
"hamnis",
"Erlend Hammnaberg",
url("https://github.com/hamnis")
)
),
sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeLegacy,
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
)
val circeDeps = List(
"io.circe" %% "circe-generic",
"io.circe" %% "circe-core"
).map(_ % "0.14.10")
val doobie = "org.tpolecat" %% "doobie-core" % "1.0.0-RC6"
lazy val `scala3-scalafix-root` = (project in file("."))
.enablePlugins(NoPublishPlugin)
.aggregate(
rules.projectRefs ++
input.projectRefs ++
output.projectRefs ++
tests.projectRefs: _*
)
lazy val rules = projectMatrix
.settings(
name := "scala3-scalafix",
moduleName := name.value,
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(V.scala213 :: V.scala212 :: Nil)
lazy val input = projectMatrix
.enablePlugins(NoPublishPlugin)
.settings(
libraryDependencies ++= circeDeps,
libraryDependencies += doobie,
SettingKey[Boolean]("ide-skip-project", rank = KeyRanks.Invisible) := true,
headerSources / excludeFilter := AllPassFilter,
tlFatalWarnings := false
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(scalaVersions = List(scala3Version))
lazy val output = projectMatrix
.enablePlugins(NoPublishPlugin)
.settings(
libraryDependencies ++= circeDeps,
libraryDependencies += doobie,
SettingKey[Boolean]("ide-skip-project", rank = KeyRanks.Invisible) := true,
headerSources / excludeFilter := AllPassFilter,
tlFatalWarnings := false
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(scalaVersions = List(scala3Version))
lazy val testsAggregate = Project("tests", file("target/testsAggregate"))
.enablePlugins(NoPublishPlugin)
.aggregate(tests.projectRefs: _*)
lazy val tests = projectMatrix
.enablePlugins(NoPublishPlugin)
.settings(
scalafixTestkitOutputSourceDirectories :=
TargetAxis
.resolve(output, Compile / unmanagedSourceDirectories)
.value,
scalafixTestkitInputSourceDirectories :=
TargetAxis
.resolve(input, Compile / unmanagedSourceDirectories)
.value,
scalafixTestkitInputClasspath :=
TargetAxis.resolve(input, Compile / fullClasspath).value,
scalafixTestkitInputScalacOptions :=
TargetAxis.resolve(input, Compile / scalacOptions).value,
scalafixTestkitInputScalaVersion :=
TargetAxis.resolve(input, Compile / scalaVersion).value
)
.defaultAxes(
rulesCrossVersions.map(VirtualAxis.scalaABIVersion) :+ VirtualAxis.jvm: _*
)
.jvmPlatform(
scalaVersions = Seq(V.scala213),
axisValues = Seq(TargetAxis(scala3Version)),
settings = Seq()
)
.dependsOn(rules)
.enablePlugins(ScalafixTestkitPlugin)