-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
40 lines (31 loc) · 1.1 KB
/
build.sc
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
import mill._
import scalalib._
import coursier.maven.MavenRepository
import scala.sys.process.Process
object server extends ScalaModule {
override def repositories = super.repositories ++ Seq(
// Not sure if this is used
MavenRepository("https://oss.sonatype.org/content/repositories/releases"),
// Not sure if this is used
MavenRepository("https://dl.bintray.com/dhpcs/maven")
)
def scalaVersion = "2.13.3"
override def ivyDeps = Agg(ivy"com.github.keyboardDrummer::languageserver::0.1.9")
object test extends Tests {
override def ivyDeps = Agg(
ivy"org.scalatest::scalatest::3.1.1"
)
def testFrameworks = Seq("org.scalatest.tools.Framework")
}
def extensionPath = os.pwd / "vscode-extension"
def vscodePrePublish() = T.command {
val assemblyPath: PathRef = assembly()
val outPath = extensionPath / "out"
os.copy(assemblyPath.path, outPath / "LanguageServer.jar", replaceExisting = true)
}
def vscode() = T.command {
vscodePrePublish()()
val vscode = Process(Seq("code", s"--extensionDevelopmentPath=$extensionPath"), None)
vscode.!
}
}