-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
83 lines (73 loc) · 2.73 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
ThisBuild / scalaVersion := "2.13.10"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / crossScalaVersions := Seq("2.12.17", "2.13.10")
ThisBuild / organization := "net.jcazevedo"
ThisBuild / organizationName := "jcazevedo"
ThisBuild / organizationHomepage := Some(url("https://jcazevedo.net/"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/jcazevedo/phalanges"),
"scm:[email protected]:jcazevedo/phalanges.git"
)
)
ThisBuild / developers := List(
Developer(
id = "jcazevedo",
name = "Joao Azevedo",
email = "[email protected]",
url = url("https://jcazevedo.net")
)
)
ThisBuild / licenses := Seq(
"MIT License" ->
url("http://www.opensource.org/licenses/mit-license.php")
)
ThisBuild / homepage := Some(url("https://github.com/jcazevedo/phalanges"))
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true
// Enable SemanticDB for Scalafix.
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
// Enable the OrganizeImports Scalafix rule.
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0"
ThisBuild / scalacOptions ++= {
val allVersionFlags = List(
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen"
)
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) =>
allVersionFlags ++ List(
"-deprecation",
"-Xlint:_,-unused",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-unused:_,-implicits"
)
case Some((2, 13)) =>
allVersionFlags ++ List("-Ywarn-unused:_,-implicits")
case _ =>
allVersionFlags
}
}
lazy val phalanges = (project in file(".")).settings(
name := "phalanges",
description := "An implementation of finger trees as proposed by Hinze and Paterson.",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1",
"org.scalacheck" %% "scalacheck" % "1.17.0" % "test",
"org.specs2" %% "specs2-core" % "4.17.0" % "test",
"org.specs2" %% "specs2-scalacheck" % "4.17.0" % "test"
),
Compile / console / scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused-import", "-Ywarn-unused:_,-implicits"),
Test / console / scalacOptions := (Compile / console / scalacOptions).value
)