-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathbuild.sbt
114 lines (101 loc) · 3.05 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
import ReleaseTransformations._
name := "uap-scala"
organization := "org.uaparser"
scalaVersion := "2.13.14"
crossScalaVersions := Seq("2.12.19", "2.13.14", "3.1.1")
scalacOptions ++= Seq(
"-Xfatal-warnings",
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked"
)
val scala2Flags = Seq(
"-Xlint:adapted-args",
"-Xsource:3",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-unused:imports"
)
scalacOptions := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
scalacOptions.value :+ "-language:implicitConversions"
case Some((2, _)) =>
scalacOptions.value ++ scala2Flags
case _ =>
scalacOptions.value
}
}
libraryDependencies += "org.yaml" % "snakeyaml" % "2.2"
libraryDependencies := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
libraryDependencies.value ++ Seq("org.specs2" %% "specs2-core" % "5.0.7" % "test")
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
libraryDependencies.value ++ Seq("org.specs2" %% "specs2-core" % "4.10.6" % "test")
case _ =>
libraryDependencies.value ++ Seq("org.specs2" %% "specs2-core" % "3.10.0" % "test")
}
}
mimaPreviousArtifacts := Set("org.uaparser" %% "uap-scala" % "0.3.0")
Compile / unmanagedResourceDirectories += baseDirectory.value / "core"
Compile / unmanagedResources / includeFilter := "regexes.yaml"
Test / unmanagedResourceDirectories += baseDirectory.value / "core"
Test / unmanagedResources / includeFilter := "*.yaml"
// Publishing
publishMavenStyle := true
publishTo := sonatypePublishToBundle.value
Test / publishArtifact := false
releaseCrossBuild := true
releaseTagComment := s"Release ${(ThisBuild / version).value}"
releaseCommitMessage := s"Set version to ${(ThisBuild / version).value}"
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
pomExtra := (
<url>https://github.com/ua-parser/uap-scala</url>
<licenses>
<license>
<name>WTFPL</name>
<url>http://www.wtfpl.net/about</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:ua-parser/uap-scala.git</url>
<connection>scm:git:[email protected]:ua-parser/uap-scala.git</connection>
</scm>
<developers>
<developer>
<id>mcveat</id>
<name>Piotr Adamski</name>
<url>https://twitter.com/mcveat</url>
</developer>
<developer>
<id>humanzz</id>
<name>Ahmed Sobhi</name>
<url>https://twitter.com/humanzz</url>
</developer>
<developer>
<id>travisbrown</id>
<name>Travis Brown</name>
<url>https://twitter.com/travisbrown</url>
</developer>
<developer>
<id>phucnh</id>
<name>Nguyen Hong Phuc</name>
<url>https://twitter.com/phuc89</url>
</developer>
</developers>)