-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathbuild.sbt
More file actions
72 lines (63 loc) · 2.08 KB
/
build.sbt
File metadata and controls
72 lines (63 loc) · 2.08 KB
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
import Versions.*
ThisBuild / intellijPluginName := "zio-intellij"
ThisBuild / intellijBuild := intellijVersion
ThisBuild / autoRemoveOldCachedIntelliJSDK := true
ThisBuild / autoRemoveOldCachedDownloads := true
Global / intellijAttachSources := true
addCommandAlias("fmt", "scalafmtAll")
addCommandAlias("check", "scalafmtCheckAll")
(Global / javacOptions) := Seq("--release", "17")
ThisBuild / scalacOptions ++= Seq(
"-explaintypes",
"-deprecation",
"-unchecked",
"-feature",
"-Xlint:serial",
"-Ymacro-annotations",
"-Xfatal-warnings",
"-language:implicitConversions",
"-language:reflectiveCalls",
"-language:existentials",
"-Wconf:msg=legacy-binding:s",
"-Ytasty-reader"
)
lazy val root =
newProject("zio-intellij", file("."))
.enablePlugins(SbtIdeaPlugin)
.settings(
patchPluginXml := pluginXmlOptions { xml =>
xml.version = version.value
xml.changeNotes = sys.env.getOrElse(
s"ZIO_INTELLIJ_CHANGE_NOTES",
s"""<![CDATA[
<b>What's new?</b>
<ul>
<li>IntelliJ IDEA $intellijHumanVersion support!</li>
</ul>
<b>Note:</b> The ZIO project wizard is temporarily disabled due to incompatibility issues.
]]>"""
)
}
)
.dependsOn(macros)
lazy val macros =
newProject("macros", file("macros"))
.enablePlugins(SbtIdeaPlugin)
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scala213 intransitive ()
)
)
def newProject(projectName: String, base: File): Project =
Project(projectName, base)
.settings(
name := projectName,
scalaVersion := scala213,
version := pluginVersion,
resolvers += Versions.intellijRepository_ForManagedIntellijDependencies,
libraryDependencies ++= Dependencies.junit,
libraryDependencies ++= Dependencies.intellijTestFrameworkAll,
intellijPlugins := Dependencies.intellijPlugins,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v", "-s", "-a", "+c", "+q"),
(Test / scalacOptions) += "-Xmacro-settings:enable-expression-tracers"
)