-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
78 lines (70 loc) · 2.24 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
import sbtrelease.ReleaseStateTransformations._
val disabledPlugins = if (sys.env.get("TRAVIS_TAG").filterNot(_.isEmpty).isDefined) {
Seq()
} else {
Seq(BintrayPlugin)
}
lazy val root = (project in file("."))
.enablePlugins(GitVersioning, GitBranchPrompt)
.disablePlugins(disabledPlugins:_*)
.settings(
name := """playjson-extended""",
organization := "com.adelegue",
resolvers += Resolver.jcenterRepo,
scalaVersion := "2.12.8",
releaseCrossBuild := true,
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.7.1",
"com.chuusai" %% "shapeless" % "2.3.3",
"org.scalatest" %% "scalatest" % "3.0.4" % Test
)
)
.settings(publishSettings:_*)
lazy val githubRepo = "larousso/playjson-extended"
lazy val publishCommonsSettings = Seq(
homepage := Some(url(s"https://github.com/$githubRepo")),
startYear := Some(2017),
licenses := Seq(("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))),
scmInfo := Some(
ScmInfo(
url(s"https://github.com/$githubRepo"),
s"scm:git:https://github.com/$githubRepo.git",
Some(s"scm:git:[email protected]:$githubRepo.git")
)
),
developers := List(
Developer("alexandre.delegue", "Alexandre Delègue", "", url(s"https://github.com/larousso"))
),
publishMavenStyle := true,
publishArtifact in Test := false,
bintrayVcsUrl := Some(s"scm:git:[email protected]:$githubRepo.git")
)
lazy val publishSettings =
if (sys.env.get("TRAVIS_TAG").filterNot(_.isEmpty).isDefined) {
publishCommonsSettings ++ Seq(
bintrayCredentialsFile := file(".credentials"),
pomIncludeRepository := { _ =>
false
}
)
} else {
publishCommonsSettings ++ Seq(
publishTo := Some(
"Artifactory Realm" at "http://oss.jfrog.org/artifactory/oss-snapshot-local"
),
bintrayReleaseOnPublish := false,
credentials := List(
Credentials("Artifactory Realm", "oss.jfrog.org", sys.env.getOrElse("BINTRAY_USER", ""), sys.env.getOrElse("BINTRAY_PASSWORD", ""))
)
)
}
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges)