-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
68 lines (50 loc) · 1.66 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
import sbtrelease._
import build._
ReleasePlugin.extraReleaseCommands
autoScalaLibrary := false
crossPaths := false
name := msgpack4zApiName
javacOptions in compile ++= Seq("-target", "6", "-source", "6")
javacOptions in (Compile, doc) ++= Seq("-locale", "en_US")
commands += Command.command("updateReadme")(UpdateReadme.updateReadmeTask)
credentials ++= PartialFunction.condOpt(sys.env.get("SONATYPE_USER") -> sys.env.get("SONATYPE_PASS")){
case (Some(user), Some(pass)) =>
Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass)
}.toList
organization := "com.github.xuwei-k"
homepage := Some(url("https://github.com/msgpack4z"))
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php"))
scalacOptions ++= (
"-deprecation" ::
"-unchecked" ::
"-Xlint" ::
"-language:existentials" ::
"-language:higherKinds" ::
"-language:implicitConversions" ::
Nil
) ::: unusedWarnings
scalaVersion := "2.12.8"
crossScalaVersions := scalaVersion.value :: Nil
pomExtra :=
<developers>
<developer>
<id>xuwei-k</id>
<name>Kenji Yoshida</name>
<url>https://github.com/xuwei-k</url>
</developer>
</developers>
<scm>
<url>git@github.com:msgpack4z/msgpack4z-api.git</url>
<connection>scm:git:git@github.com:msgpack4z/msgpack4z-api.git</connection>
<tag>{if(isSnapshot.value) gitHash else { "v" + version.value }}</tag>
</scm>
description := "msgpack4z api"
Seq(Compile, Test).flatMap(c =>
scalacOptions in (c, console) ~= {_.filterNot(unusedWarnings.toSet)}
)
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)