-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
45 lines (39 loc) · 1.13 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
val scalaV = "2.11.8"
lazy val root = plugin.in(file("."))
.settings(
crossScalaVersions := Seq(scalaV, "2.10.6")
)
.aggregate(plugin, test)
lazy val commonSettings = Seq(
scalaVersion := scalaV,
organization := "com.joprice",
version := "0.0.1-SNAPSHOT"
)
lazy val plugin = project
.settings(
name := "type-formatter"
)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
)
// taken from https://github.com/milessabin/si2712fix-plugin/blob/master/build.sbt#L31
lazy val usePluginSettings = Seq(
scalacOptions in Compile <++= (Keys.`package` in (plugin, Compile)) map { (jar: File) =>
System.setProperty("sbt.paths.plugin.jar", jar.getAbsolutePath)
val addPlugin = "-Xplugin:" + jar.getAbsolutePath
val dummy = "-Jdummy=" + jar.lastModified
Seq(addPlugin, dummy)
}
)
lazy val test = project
.settings(commonSettings)
.settings(usePluginSettings)
.settings(
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.1"
)
)