-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sc
39 lines (31 loc) · 1018 Bytes
/
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
import mill._
import os.up
import scalalib._
object session extends SbtModule with ScalaModule {
def scalaVersion = "2.13.6"
override def scalacOptions = Seq("-deprecation")
override def mainClass = Some("org.texmacs.TeXmacs")
override def ivyDeps = Agg(
ivy"com.lihaoyi:ammonite_${scalaVersion()}:2.4.0"
)
object test extends Tests {
override def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.1.1")
def testFrameworks = Seq("org.scalatest.tools.Framework")
}
def install = T {
assembly()
// Make the dist
val distDir = T.dest / "scala"
if (os.exists (distDir)) os.remove.all(distDir)
os.makeDir(distDir)
os.copy(millSourcePath / "progs", distDir / "progs")
os.copy(
millSourcePath / up / "out" / "session" / "assembly" / "dest" / "out.jar",
distDir / "texmacs.jar"
)
// Install
val targetDir = os.home / ".TeXmacs" / "plugins" / "scala"
if (os.exists(targetDir)) os.remove.all(targetDir)
os.copy(distDir, targetDir)
}
}