This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
build.sbt
73 lines (63 loc) · 2.4 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
ideaBuild in ThisBuild := "193.5233.102"
// Download the IDEA SDK on startup
onLoad in Global := ((s: State) => { "updateIdea" :: s}) compose (onLoad in Global).value
lazy val commonSettings = Seq(
scalaSource in Compile := baseDirectory.value / "src",
scalaSource in Test := baseDirectory.value / "test",
javaSource in Compile := baseDirectory.value / "src",
javaSource in Test := baseDirectory.value / "test",
resourceDirectory in Compile := baseDirectory.value / "resources",
resourceDirectory in Test := baseDirectory.value / "test-resources",
scalaVersion := "2.12.10",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
),
javacOptions ++= Seq(
"-Xlint:deprecation"
),
mainClass in (Compile, run) := Some("com.intellij.idea.Main"),
// Add tools.jar, from https://stackoverflow.com/a/12508163/348497
unmanagedJars in Compile ~= {uj =>
Attributed.blank(file(System.getProperty("java.home").dropRight(3) + "lib/tools.jar")) +: uj
},
fork in run := true,
javaOptions in run := Seq(
"-ea", // enable Java assertions
s"-Didea.home.path=${ideaBaseDirectory.value}",
),
)
lazy val root = (project in file(".")).
aggregate(`intellij-lsp`, `intellij-lsp-dotty`)
lazy val `intellij-lsp` = (project in file("intellij-lsp")).
enablePlugins(SbtIdeaPlugin). // See https://github.com/JetBrains/sbt-idea-plugin for documentation
settings(commonSettings).
settings(
name := "intellij-lsp",
description := "Language Server Protocol plugin for IntelliJ IDEA",
version := "1.6.1",
ideaInternalPlugins := Seq(
"IntelliLang",
),
libraryDependencies ++= Seq(
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.8.1",
"io.get-coursier" %% "coursier" % "1.0.3",
"io.get-coursier" %% "coursier-cache" % "1.0.3",
"com.vladsch.flexmark" % "flexmark" % "0.42.12"
),
)
lazy val `intellij-lsp-dotty` = (project in file("intellij-lsp-dotty")).
enablePlugins(SbtIdeaPlugin).
dependsOn(`intellij-lsp`).
settings(commonSettings).
settings(
name := "intellij-lsp-dotty",
description := "Dotty Language Server plugin for IntelliJ IDEA",
version := "0.1.0-SNAPSHOT",
libraryDependencies ++= Seq(
scalaOrganization.value % "scala-reflect" % scalaVersion.value,
"org.scalameta" %% "scalameta" % "1.8.0",
"org.scalastyle" %% "scalastyle" % "1.0.0",
),
)