-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
111 lines (101 loc) · 2.76 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import sbt._
import Keys._
val scaladocBranch = TaskKey[String]("scaladoc-branch")
def Scala211 = "2.11.11"
def Scala212 = "2.12.6"
def Scala213 = "2.13.13"
scalaVersion := Scala213
crossScalaVersions := Seq(Scala211, Scala212, Scala213)
val baseSettings = Seq(
organization := "com.github.kmizu",
scalaVersion := Scala213,
autoAPIMappings := true,
libraryDependencies ++= Seq(
"junit" % "junit" % "4.12" % "test"
),
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "4.8.2" % "test",
"junit" % "junit" % "4.13.2" % "test"
),
scalacOptions ++= Seq("-deprecation", "-unchecked"),
scalacOptions ++= {
Seq("-language:implicitConversions")
},
scaladocBranch := "master",
scalacOptions in (Compile, doc) ++= {
val bd = baseDirectory.value
val sb = scaladocBranch.value
Seq("-sourcepath", bd.getAbsolutePath, "-doc-source-url", "https://github.com/kmizu/jsonda/tree/" + sb + "€{FILE_PATH}.scala")
},
testOptions += Tests.Argument(TestFrameworks.Specs2, "console"),
publishMavenStyle := true,
publishTo := {
val v = version.value
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := (
<url>https://github.com/kmizu/jsonda</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:kmizu/jsonda.git</url>
<connection>scm:git:[email protected]:kmizu/jsonda.git</connection>
</scm>
<developers>
<developer>
<id>kmizu</id>
<name>Kota Mizushima</name>
<url>https://github.com/kmizu</url>
</developer>
</developers>
)
)
lazy val root = Project(
id = "jsonda",
base = file(".")
).settings(
baseSettings ++ Seq(
publishArtifact := false, publish := {}, publishLocal := {}
): _*
).enablePlugins(
ScalaUnidocPlugin
).aggregate(
core, json4s, play_json
)
lazy val core = Project(
id = "jsonda-core",
base = file("core")
).settings(
baseSettings: _*
)
lazy val play_json = Project(
id = "jsonda-play_json",
base = file("play_json")
).settings(
baseSettings ++ Seq(
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.8.1"
)
): _*
).dependsOn(core)
lazy val json4s = Project(
id = "jsonda-json4s",
base = file("json4s")
).settings(
baseSettings ++ Seq(
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-native" % "3.6.12"
)
): _*
).dependsOn(core)