-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
66 lines (60 loc) · 2.2 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
lazy val V = _root_.scalafix.Versions
lazy val scalafixVersion = V.version
// Use a scala version supported by scalafix.
ThisBuild / scalaVersion := V.scala212
ThisBuild / organization := "com.eed3si9n.fix"
ThisBuild / organizationName := "eed3si9n"
ThisBuild / organizationHomepage := Some(url("http://eed3si9n.com/"))
ThisBuild / homepage := Some(url("https://github.com/eed3si9n/scalafix-noinfer"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/eed3si9n/scalafix-noinfer"), "[email protected]:eed3si9n/scalafix-noinfer.git"))
ThisBuild / developers := List(
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n"))
)
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / description := "A Scalafix rule to suppress specific type inference."
ThisBuild / licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
lazy val root = (project in file("."))
.aggregate(rules, tests)
.settings(
name := "scalafix-noinfer-root",
publish / skip := true
)
lazy val rules = project
.settings(
name := "scalafix-noinfer",
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % scalafixVersion
)
lazy val input = project
.settings(
scalafixSourceroot := (Compile / sourceDirectory).value,
addCompilerPlugin(scalafixSemanticdb),
scalacOptions ++= List(
"-Xlint",
"-Yrangepos",
"-Ywarn-unused-import",
"-P:semanticdb:synthetics:on",
s"-P:semanticdb:sourceroot:${baseDirectory.value}"),
publish / skip := true
)
lazy val output = project
.settings(
publish / skip := true
)
lazy val tests = project
.enablePlugins(BuildInfoPlugin)
.dependsOn(input, rules)
.settings(
publish / skip := true,
libraryDependencies += "ch.epfl.scala" % "scalafix-testkit" % scalafixVersion % Test cross CrossVersion.full,
buildInfoPackage := "fix",
buildInfoKeys := Seq[BuildInfoKey](
"inputBaseDirectory" ->
(input / baseDirectory).value,
"inputSourceroot" ->
(input / Compile / sourceDirectory).value,
"outputSourceroot" ->
(output / Compile / sourceDirectory).value,
"inputClassdirectory" ->
(input / Compile / classDirectory).value
)
)