-
Notifications
You must be signed in to change notification settings - Fork 41
/
build.sbt
77 lines (68 loc) · 2.29 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 org.jetbrains.sbtidea.{AutoJbr, JbrPlatform}
lazy val scala213 = "2.13.15"
lazy val scalaPluginVersion = "2024.3.18"
lazy val minorVersion = "0"
lazy val buildVersion = sys.env.getOrElse("ZIO_INTELLIJ_BUILD_NUMBER", minorVersion)
lazy val pluginVersion = s"2024.3.35.$buildVersion"
ThisBuild / intellijPluginName := "zio-intellij"
ThisBuild / intellijBuild := "243"
ThisBuild / jbrInfo := AutoJbr(explicitPlatform = Some(JbrPlatform.osx_aarch64))
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"
)
lazy val root =
newProject("zio-intellij", file("."))
.enablePlugins(SbtIdeaPlugin)
.settings(
patchPluginXml := pluginXmlOptions { xml =>
xml.version = version.value
xml.changeNotes = sys.env.getOrElse(
"ZIO_INTELLIJ_CHANGE_NOTES",
s"""<![CDATA[
<b>What's new?</b>
<ul>
<li>IntelliJ IDEA 2024.3 support!</li>
</ul>
]]>"""
)
}
)
.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,
libraryDependencies ++= Seq(
"junit" % "junit" % "4.13.2" % Test,
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
"org.junit.jupiter" % "junit-jupiter-api" % "5.11.1" % Test
),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v", "-s", "-a", "+c", "+q"),
intellijPlugins := Seq(
"com.intellij.java".toPlugin,
s"org.intellij.scala:$scalaPluginVersion".toPlugin
),
(Test / scalacOptions) += "-Xmacro-settings:enable-expression-tracers"
)