This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sbt
108 lines (102 loc) · 3.9 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
import scalariform.formatter.preferences._
lazy val globalSettings = Seq(
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
resolvers += "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
organization := "org.gnieh",
licenses += ("The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/gnieh/sohva")),
scmInfo := Some(ScmInfo(url("https://github.com/gnieh/sohva"), "git@github.com:gnieh/sohva.git")),
version := "3.0.0-SNAPSHOT",
scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.12.2", "2.11.8"),
libraryDependencies ++= globalDependencies,
parallelExecution := false,
fork in Test := true,
scalacOptions ++= Seq("-deprecation", "-feature"),
scalacOptions in (Compile, doc) ++= Seq("-groups")
)
lazy val scalariform = Seq(
scalariformAutoformat := true,
scalariformPreferences :=
scalariformPreferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(DanglingCloseParenthesis, Preserve)
.setPreference(MultilineScaladocCommentsStartOnFirstLine, true)
)
lazy val globalDependencies = Seq(
"org.scalatest" %% "scalatest" % "3.0.4" % "test",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.11",
"com.typesafe.akka" %% "akka-stream-testkit" % "2.5.8",
"org.gnieh" %% "diffson-spray-json" % "2.2.4",
"io.spray" %% "spray-json" % "1.3.4",
"org.slf4j" % "slf4j-api" % "1.7.25"
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
// The Nexus repo we're publishing to.
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
pomIncludeRepository := { x => false },
pomExtra := (
<scm>
<url>https://github.com/gnieh/sohva</url>
<connection>scm:git:git://github.com/gnieh/sohva.git</connection>
<developerConnection>scm:git:git@github.com:gnieh/sohva.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>satabin</id>
<name>Lucas Satabin</name>
<email>lucas.satabin@gnieh.org</email>
</developer>
</developers>
<ciManagement>
<system>travis</system>
<url>https://travis-ci.org/#!/gnieh/sohva</url>
</ciManagement>
<issueManagement>
<system>github</system>
<url>https://github.com/gnieh/sohva/issues</url>
</issueManagement>
)
)
lazy val sohva = project.in(file("."))
.dependsOn(json % "compile-internal, test-internal")
.enablePlugins(SiteScaladocPlugin, JekyllPlugin, SbtOsgi, GhpagesPlugin)
.settings(globalSettings)
.settings(publishSettings)
.settings(osgiSettings)
.settings(scalariform)
.settings (
name := "sohva",
description := "Couchdb client library",
fork in test := true,
mappings in (Compile, packageBin) ++= mappings.in(json, Compile, packageBin).value,
mappings in (Compile, packageSrc) ++= mappings.in(json, Compile, packageSrc).value,
sources in (Compile, doc) ++= sources.in(json, Compile, doc).value,
com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport.requiredGems := Map(
"jekyll" -> "3.3.0"),
git.remoteRepo := scmInfo.value.get.connection,
resourceDirectories in Compile := List(),
OsgiKeys.exportPackage := Seq(
"gnieh.sohva",
"gnieh.sohva.*"
),
OsgiKeys.additionalHeaders := Map (
"Bundle-Name" -> "Sohva CouchDB Client"
),
OsgiKeys.bundleSymbolicName := "org.gnieh.sohva",
OsgiKeys.privatePackage := Seq())
lazy val json = project.in(file("sohva-json"))
.settings(globalSettings)
.settings(scalariform)
.settings(
libraryDependencies ++= globalDependencies,
libraryDependencies += scalaVersion("org.scala-lang" % "scala-reflect" % _).value)