forked from muuki88/sbt-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
83 lines (69 loc) · 2.67 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
name := "sbt-graphql"
organization := "rocks.muki"
sbtPlugin := true
enablePlugins(SbtPlugin)
val circeVersion = "0.11.1"
val catsVersion = "1.5.0"
libraryDependencies ++= Seq(
"org.sangria-graphql" %% "sangria" % "1.4.2",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-jackson28" % circeVersion,
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-testkit" % catsVersion % Test,
"org.scalaj" %% "scalaj-http" % "2.3.0",
"org.scalameta" %% "scalameta" % "4.0.0",
"org.scalatest" %% "scalatest" % "3.0.5" % Test
)
// scripted test settings
scriptedLaunchOpts += "-Dproject.version=" + version.value
scalacOptions += "-Ypartial-unification"
// project meta data
licenses := Seq("Apache-2.0" -> url("https://opensource.org/licenses/Apache-2.0"))
homepage := Some(url("https://github.com/muuki88/sbt-graphql"))
scmInfo := Some(
ScmInfo(
url("https://github.com/muuki88/sbt-graphql"),
"scm:[email protected]:muuki88/sbt-graphql.git"
)
)
developers := List(
Developer(
id = "muuki88",
name = "Nepomuk Seiler",
email = "[email protected]",
url = url("https://www.muki.rocks")
)
)
// bintray config
bintrayOrganization := Some("sbt")
bintrayRepository := "sbt-plugin-releases"
// git versioning
enablePlugins(GitVersioning)
// The BaseVersion setting represents the in-development (upcoming) version, as an alternative to SNAPSHOTS.
git.baseVersion := "0.7.0"
// Create a release for every release tag
val ReleaseTag = """^v([\d\.]+)$""".r
git.gitTagToVersionNumber := {
case ReleaseTag(v) => Some(v)
case _ => None
}
git.formattedShaVersion := {
val suffix =
git.makeUncommittedSignifierSuffix(git.gitUncommittedChanges.value, git.uncommittedSignifier.value)
git.gitHeadCommit.value map { _.substring(0, 7) } map { sha =>
git.baseVersion.value + "-" + sha + suffix
}
}
// says that we do not want to use the GPG tools installed on your computer, but rather the implementation that sbt-pgp
// ships with; in my experience this is a must, otherwise depending on the GPG tools you have, you won't be able to make
// it use a different pgp ring
useGpg := false
// forces a certain key to be used for signing by specifying its key
usePgpKeyHex("0341175F3C364000")
pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pub.asc"
pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "sec.asc"
// Travis has the ability to set such env variables to be available in your build
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toArray)
// ci commands
addCommandAlias("validateFormatting", "; scalafmtCheckAll ; scalafmtSbtCheck ")
addCommandAlias("validate", "; clean ; update ; validateFormatting ; test ; scripted")