forked from algolia/algoliasearch-client-scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
135 lines (112 loc) · 4.38 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
organization := "com.algolia"
name := "algoliasearch-scala"
description := "Scala client for Algolia Search API"
version := "1.22.0-SNAPSHOT"
scalaVersion := "2.11.7"
//Wait fix in sbt-coveralls
ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := false //setting to true crashes the coverage
//coverageEnabled := true
val asyncHttpClientVersion = "2.0.4"
val json4sVersion = "3.5.0"
val scalaTestVersion = "2.2.6"
val scalaMockVersion = "3.2"
val scalacheckVersion = "1.12.1"
libraryDependencies += "org.asynchttpclient" % "async-http-client" % asyncHttpClientVersion
libraryDependencies += "org.json4s" %% "json4s-ast" % json4sVersion
libraryDependencies += "org.json4s" %% "json4s-core" % json4sVersion
libraryDependencies += "org.json4s" %% "json4s-native" % json4sVersion
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.1.3"
libraryDependencies += "com.netaporter" %% "scala-uri" % "0.4.14"
//Testing
libraryDependencies += "org.scalatest" %% "scalatest" % scalaTestVersion % "test"
libraryDependencies += "org.scalacheck" %% "scalacheck" % scalacheckVersion % "test"
libraryDependencies += "org.scalamock" %% "scalamock-scalatest-support" % scalaMockVersion % "test"
scalacOptions ++= Seq("-feature", "-unchecked")
/**
* Publishing to Sonatype & Maven Central
*
* > gem install github_changelog_generator
* > github_changelog_generator -t YOUR_GITHUB_TOKEN --no-unreleased
* > sbt publishSigned
* > sbt sonatypeRelease
*
* see: http://www.scala-sbt.org/0.13/docs/Using-Sonatype.html
* see: https://github.com/xerial/sbt-sonatype
*
**/
headers := Map(
"scala" -> (
de.heikoseeberger.sbtheader.HeaderPattern.cStyleBlockComment,
"""|/*
| * The MIT License (MIT)
| *
| * Copyright (c) 2016 Algolia
| * http://www.algolia.com/
| *
| * Permission is hereby granted, free of charge, to any person obtaining a copy
| * of this software and associated documentation files (the "Software"), to deal
| * in the Software without restriction, including without limitation the rights
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
| * copies of the Software, and to permit persons to whom the Software is
| * furnished to do so, subject to the following conditions:
| *
| * The above copyright notice and this permission notice shall be included in
| * all copies or substantial portions of the Software.
| *
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
| * THE SOFTWARE.
| */
|
|""".stripMargin
)
)
lazy val myProject = project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin, BuildInfoPlugin)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "algolia"
)
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ =>
false
}
pomExtra := {
<url>https://github.com/algolia/algoliasearch-client-scala</url>
<licenses>
<license>
<name>The MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:[email protected]:algolia/algoliasearch-client-scala.git</connection>
<url>scm:git:[email protected]:algolia/algoliasearch-client-scala.git</url>
<developerConnection>scm:git:[email protected]:algolia/algoliasearch-client-scala.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>algolia</id>
<name>Algolia SAS</name>
<email>[email protected]</email>
<url>https://github.com/algolia/algoliasearch-client-scala</url>
</developer>
</developers>
}
publishTo := {
if (isSnapshot.value) {
Some(Opts.resolver.sonatypeSnapshots)
} else {
Some(Opts.resolver.sonatypeStaging)
}
}
addCommandAlias("formatAll", ";scalafmt")
addCommandAlias("checkAll", ";compile;test:compile;formatAll")