-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
86 lines (68 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
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
import sbtrelease._
import xerial.sbt.Sonatype._
import ReleaseStateTransformations._
import build._
ReleasePlugin.extraReleaseCommands
autoScalaLibrary := false
crossPaths := false
name := msgpack4zJavaName
compile / javacOptions ++= Seq("-target", "8", "-source", "8")
commands += Command.command("updateReadme")(UpdateReadme.updateReadmeTask)
libraryDependencies ++= (
("org.msgpack" % "msgpack-core" % "0.9.9") ::
("com.github.xuwei-k" % "msgpack4z-api" % "0.2.0") ::
Nil
)
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
UpdateReadme.updateReadmeProcess,
tagRelease,
ReleaseStep(state => Project.extract(state).runTask(PgpKeys.publishSigned, state)._1),
setNextVersion,
commitNextVersion,
UpdateReadme.updateReadmeProcess,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
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
)
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>[email protected]:msgpack4z/msgpack4z-java.git</url>
<connection>scm:git:[email protected]:msgpack4z/msgpack4z-java.git</connection>
<tag>{if(isSnapshot.value) gitHash else { "v" + version.value }}</tag>
</scm>
description := "msgpack4z"
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)