-
Notifications
You must be signed in to change notification settings - Fork 6
/
BuildSettings.scala
75 lines (66 loc) · 2.56 KB
/
BuildSettings.scala
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
/*
* Copyright (c) 2012-2022 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
import sbt._
import Keys._
// dynver plugin
import sbtdynver.DynVerPlugin.autoImport._
// Mima plugin
import com.typesafe.tools.mima.plugin.MimaKeys._
// Scoverage
import scoverage.ScoverageKeys._
// Site plugin
import com.typesafe.sbt.site.SitePlugin.autoImport.siteSubdirName
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
object BuildSettings {
lazy val publishSettings = Seq[Setting[_]](
publishArtifact := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
homepage := Some(url("http://snowplowanalytics.com")),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")),
ThisBuild / dynverVTagPrefix := false, // Otherwise git tags required to have v-prefix
developers := List(
Developer(
"Snowplow Analytics Ltd",
"Snowplow Analytics Ltd",
"support@snowplowanalytics.com",
url("https://snowplowanalytics.com")
)
)
)
lazy val javaCompilerOptions = Seq("-source", "11", "-target", "11")
lazy val coverageSettings = Seq(
coverageMinimumStmtTotal := 90,
coverageFailOnMinimum := false,
(Test / test) := {
(coverageReport dependsOn (Test / test)).value
}
)
// If a new version introduces breaking changes,
// clear `mimaBinaryIssueFilters` and `mimaPreviousVersions`.
// Otherwise, add previous version to the set without
// removing older versions.
lazy val mimaPreviousVersions = Set()
lazy val mimaSettings = Seq(
mimaPreviousArtifacts := mimaPreviousVersions.map { organization.value %% name.value % _ },
ThisBuild / mimaFailOnNoPrevious := false,
mimaBinaryIssueFilters ++= Seq(),
Test / test := {
mimaReportBinaryIssues.value
(Test / test).value
}
)
lazy val docSettings = Seq(
SiteScaladoc / siteSubdirName := s"${version.value}",
)
}