forked from lihaoyi/autowire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
64 lines (61 loc) · 2.46 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
import sbtcrossproject.CrossProject
val baseSettings = Seq(
organization := "com.lihaoyi",
name := "autowire",
version := "0.3.3-SNAPSHOT",
scalaVersion := "2.13.2",
crossScalaVersions := Seq("2.12.11", "2.13.2"),
scmInfo := Some(ScmInfo(
browseUrl = url("https://github.com/lihaoyi/autowire"),
connection = "scm:git:git@github.com:lihaoyi/autowire.git"
)),
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")),
homepage := Some(url("https://github.com/lihaoyi/autowire")),
developers += Developer(
email = "haoyi.sg@gmail.com",
id = "lihaoyi",
name = "Li Haoyi",
url = url("https://github.com/lihaoyi")
),
scalacOptions ++= Seq("-deprecation", "-feature", "-language:higherKinds")
)
val autowire = crossProject(JSPlatform, JVMPlatform)
.settings(baseSettings)
.settings(
autoCompilerPlugins := true,
addCompilerPlugin("com.lihaoyi" %% "acyclic" % "0.2.0"),
libraryDependencies ++= Seq(
"com.lihaoyi" %% "acyclic" % "0.2.0" % Provided,
"com.lihaoyi" %%% "utest" % "0.7.4" % Test,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.lihaoyi" %%% "upickle" % "1.1.0" % Test,
"com.typesafe.play" %%% "play-json" % "2.9.0" % Test,
// "io.suzaku" %%% "boopickle" % "1.3.2" % Test
),
testFrameworks += new TestFramework("utest.runner.Framework"),
publishArtifact in Test := false,
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
)
.jsSettings(
scalaJSStage in Test := FullOptStage,
scalacOptions += {
val tagOrHash =
if (isSnapshot.value) sys.process.Process("git rev-parse HEAD").lineStream_!.head
else "v" + version.value
val a = (baseDirectory in LocalRootProject).value.toURI.toString
val g = "https://raw.githubusercontent.com/lihaoyi/autowire/" + tagOrHash
s"-P:scalajs:mapSourceURI:$a->$g/"
}
)
.jvmSettings(
resolvers += "Typesafe Repo" at "https://repo.typesafe.com/typesafe/releases/",
libraryDependencies ++= Seq(
// Latest Kryo apparently have some problems with Java generics
// https://github.com/EsotericSoftware/kryo/pull/683
// "com.esotericsoftware" % "kryo" % "5.0.0-RC6" % Test
// Rolling back to latest stable release allows 2.12.11 test to pass
"com.esotericsoftware" % "kryo" % "4.0.2" % Test
)
)
lazy val autowireJS = autowire.js
lazy val autowireJVM = autowire.jvm