-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
77 lines (69 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
76
77
import microsites.MicrositeEditButton
lazy val V = _root_.scalafix.sbt.BuildInfo
inThisBuild(
List(
organization := "org.scalalint",
homepage := Some(url("https://www.scalalint.org")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
startYear := Some(2019),
developers := List(
Developer(
"pdalpra",
"Pierre Dal-Pra",
"dalpra.pierre@gmail.com",
url("https://www.scalalint.org")
)
),
scalaVersion := V.scala212,
addCompilerPlugin(scalafixSemanticdb),
scalacOptions ++= List(
"-Yrangepos",
"-P:semanticdb:synthetics:on"
)
)
)
skip in publish := true
lazy val rules = project
.enablePlugins(AutomateHeaderPlugin)
.settings(
moduleName := "rules",
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion,
headerLicense := Some(HeaderLicense.ALv2("2019", "Pierre Dal-Pra")),
scalafmtOnCompile := true
)
lazy val input = project.configure(scalafixTestModule)
lazy val output = project.configure(scalafixTestModule)
lazy val tests = project
.dependsOn(rules)
.configure(scalafixTestModule)
.enablePlugins(ScalafixTestkitPlugin)
.settings(
libraryDependencies += "ch.epfl.scala" % "scalafix-testkit" % V.scalafixVersion % Test cross CrossVersion.full,
Compile / compile := (Compile / compile).dependsOn(input / Compile / compile).value,
scalafixTestkitOutputSourceDirectories := (output / Compile / sourceDirectories).value,
scalafixTestkitInputSourceDirectories := (input / Compile / sourceDirectories).value,
scalafixTestkitInputClasspath := (input / Compile / fullClasspath).value
)
lazy val docs = project
.enablePlugins(MicrositesPlugin)
.settings(
skip in publish := true,
micrositeName := "Scalalint",
micrositeDescription := "A Scala linter based on Scalafix",
micrositeUrl := "https://www.scalalint.org",
micrositeDocumentationUrl := "/docs",
micrositeAuthor := "Pierre Dal-Pra",
micrositeTwitter := "@pierre_dalpra",
micrositeGithubOwner := "pdalpra",
micrositeGithubRepo := "scalalint",
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
micrositeGitterChannel := true,
micrositeGitterChannelUrl := "scalalint/scalalint",
micrositeShareOnSocial := false,
micrositeEditButton := Some(
MicrositeEditButton("Improve this Page", "/edit/master/docs/src/main/tut/{{ page.path }}")
)
)
def scalafixTestModule(project: Project) =
project.disablePlugins(ScalafmtPlugin).settings(skip in publish := true)