This repository was archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
115 lines (99 loc) · 3.04 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Copyright: 2017 https://github.com/cakesolutions/sbt-cake/graphs
// License: http://www.apache.org/licenses/LICENSE-2.0
import de.heikoseeberger.sbtheader.{CommentStyle, FileType}
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.HeaderFileType
import net.cakesolutions.CakePlatformDependencies._
// Copy centralised library dependencies into this build level
Compile / unmanagedSources +=
baseDirectory.value / "project" / "project" / "CakePlatformDependencies.scala"
organization := "net.cakesolutions"
name := "sbt-cake"
sbtPlugin := true
// scalastyle:off magic.number
startYear := Some(2017)
licenses :=
Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
headerLicense := Some(
HeaderLicense.Custom(
"""|Copyright: 2017-2018 https://github.com/cakesolutions/sbt-cake/graphs
|License: http://www.apache.org/licenses/LICENSE-2.0
|""".stripMargin
)
)
headerMappings :=
headerMappings.value ++
Map(
FileType("sbt") -> CommentStyle.cppStyleLineComment,
HeaderFileType.java -> CommentStyle.cppStyleLineComment,
HeaderFileType.scala -> CommentStyle.cppStyleLineComment
)
ivyLoggingLevel := UpdateLogging.Quiet
scalacOptions in Compile ++= Seq("-feature", "-deprecation")
addSbtPlugin(SbtDependencies.buildInfo)
addSbtPlugin(SbtDependencies.pgp)
addSbtPlugin(SbtDependencies.digest)
addSbtPlugin(SbtDependencies.git)
addSbtPlugin(SbtDependencies.gzip)
addSbtPlugin(SbtDependencies.packager)
addSbtPlugin(SbtDependencies.Coursier.sbt)
addSbtPlugin(SbtDependencies.scoverage)
addSbtPlugin(SbtDependencies.scalafix)
addSbtPlugin(SbtDependencies.gatling)
// The following plugin is otherwise known as neo-sbt-scalafmt
// - see: https://github.com/lucidsoftware/neo-sbt-scalafmt
addSbtPlugin(SbtDependencies.scalafmt)
enablePlugins(ScalafmtPlugin)
dependencyOverrides ++= Seq(
guava,
typesafeConfig,
SbtDependencies.Coursier.cache,
SbtDependencies.Coursier.core,
SbtDependencies.packager,
ApacheCommons.codec,
ApacheCommons.logging,
ApacheCommons.compress,
ApacheCommons.lang3,
httpClient,
levelDbJni,
quasiQuotes,
Slf4j.api,
Webjars.locator
)
// For publishing this plugin to Sonatype in CI environments
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ =>
false
}
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (sys.env.get("CI").isDefined) {
if (isSnapshot.value) {
Some("snapshots" at nexus + "content/repositories/snapshots")
} else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
} else {
None
}
}
pomExtra := {
val user = "cakesolutions"
val repository = name.value
<url>https://github.com/{user}/{repository}</url>
<scm>
<url>
https://github.com/{user}/{repository}
</url>
<connection>
https://github.com/{user}/{repository}
</connection>
</scm>
<developers>
<developer>
<id>{user}</id>
</developer>
</developers>
}
scriptedBufferLog := false
scriptedLaunchOpts := Seq("-Dplugin.version=" + version.value)