-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
113 lines (106 loc) · 3.21 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
import ReleaseTransformations._
lazy val V = _root_.scalafix.sbt.BuildInfo
lazy val commonSettings = Def.settings(
organization := "org.scalaz",
homepage := Some(url("https://github.com/scalaz/scalazfix")),
licenses := Seq("MIT License" -> url("https://opensource.org/licenses/mit-license")),
description := "scalafix rule for scalaz",
scalaVersion := V.scala212,
addCompilerPlugin(scalafixSemanticdb),
releaseCrossBuild := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommandAndRemaining("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
),
pomExtra := (
<developers>
<developer>
<id>xuwei-k</id>
<name>Kenji Yoshida</name>
<url>https://github.com/xuwei-k</url>
</developer>
</developers>
<scm>
<url>[email protected]:scalaz/scalazfix.git</url>
<connection>scm:git:[email protected]:scalaz/scalazfix.git</connection>
</scm>
),
publishTo := sonatypePublishToBundle.value,
Compile / doc / scalacOptions ++= {
val hash = sys.process.Process("git rev-parse HEAD").lineStream_!.head
Seq(
"-sourcepath",
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url",
s"https://github.com/scalaz/scalazfix/tree/${hash}€{FILE_PATH}.scala"
)
},
scalacOptions ++= PartialFunction
.condOpt(CrossVersion.partialVersion(scalaVersion.value)) {
case Some((2, v)) if v >= 12 =>
Seq(
"-Ywarn-unused:imports",
)
}
.toList
.flatten,
scalacOptions ++= PartialFunction
.condOpt(CrossVersion.partialVersion(scalaVersion.value)) {
case Some((2, v)) if v <= 12 =>
Seq(
"-Yno-adapted-args",
"-Xfuture",
)
}
.toList
.flatten,
scalacOptions ++= List(
"-deprecation",
"-unchecked",
"-Yrangepos",
"-P:semanticdb:synthetics:on"
)
)
commonSettings
publish / skip := true
lazy val rules = project.settings(
commonSettings,
name := "scalazfix",
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion
)
lazy val input = project.settings(
commonSettings,
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.2.30", // scala-steward:off
publish / skip := true
)
lazy val output = project.settings(
commonSettings,
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.3.8",
publish / skip := true
)
lazy val tests = project
.settings(
commonSettings,
publish / skip := true,
libraryDependencies += "ch.epfl.scala" % "scalafix-testkit" % V.scalafixVersion % Test cross CrossVersion.full,
Compile / compile :=
(Compile / compile).dependsOn(compile.in(input, Compile)).value,
scalafixTestkitOutputSourceDirectories :=
sourceDirectories.in(output, Compile).value,
scalafixTestkitInputSourceDirectories :=
sourceDirectories.in(input, Compile).value,
scalafixTestkitInputClasspath :=
fullClasspath.in(input, Compile).value,
)
.dependsOn(rules)
.enablePlugins(ScalafixTestkitPlugin)