This repository has been archived by the owner on Sep 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.sbt
47 lines (44 loc) · 2.07 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
ThisBuild / version := "0.6.1-SNAPSHOT"
ThisBuild / organization := "org.foundweekends"
ThisBuild / homepage := Some(url(s"https://github.com/sbt/${name.value}/#readme"))
ThisBuild / description := "your packages, delivered fresh"
ThisBuild / developers := List(
Developer("softprops", "Doug Tangren", "@softprops", url("https://github.com/softprops"))
)
ThisBuild / scmInfo := Some(ScmInfo(url(s"https://github.com/sbt/${name.value}"), s"[email protected]:sbt/{name.value}.git"))
ThisBuild / crossScalaVersions := Seq("2.12.12", "2.13.3")
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last
lazy val dispatchVersion = settingKey[String]("")
lazy val unusedWarnings = Seq("-Ywarn-unused")
lazy val commonSettings: Seq[Setting[_]] = Seq(
licenses := Seq("MIT" ->
url(s"https://github.com/sbt/${name.value}/blob/${version.value}/LICENSE")),
scalacOptions ++= Seq(Opts.compile.deprecation, "-Xlint", "-feature"),
scalacOptions ++= PartialFunction.condOpt(CrossVersion.partialVersion(scalaVersion.value)){
case Some((2, v)) if v >= 11 => unusedWarnings
}.toList.flatten,
publishArtifact in Test := false,
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")
},
publishMavenStyle := true,
pomIncludeRepository := { x => false }
) ++ Seq(Compile, Test).flatMap(c =>
scalacOptions in (c, console) --= unusedWarnings
)
lazy val root = (project in file("."))
.settings(commonSettings)
.settings(
name := "bintry",
description := "your packages, delivered fresh",
dispatchVersion := "1.2.0",
libraryDependencies ++= Seq(
"org.dispatchhttp" %% "dispatch-json4s-native" % dispatchVersion.value,
"com.eed3si9n.verify" %% "verify" % "0.2.0" % Test,
),
testFrameworks += new TestFramework("verify.runner.Framework"),
initialCommands := "import scala.concurrent.ExecutionContext.Implicits.global;"
)