-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
146 lines (138 loc) · 4.29 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import xerial.sbt.Sonatype._
lazy val scala213 = "2.13.0"
lazy val scala212 = "2.12.8"
lazy val scala211 = "2.11.12"
// temporary not supporting 2.11-2.12 since i want
// to get the functionality first before doing this
lazy val supportedScalaVersions =
// List(scala211, scala212, scala213)
List(scala213)
ThisBuild / organization := "com.tkroman"
ThisBuild / version := "0.0.11"
ThisBuild / licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
ThisBuild / homepage := Some(url("http://github.com/tkroman/puree"))
ThisBuild / scalaVersion := scala213
ThisBuild / sonatypeProfileName := "com.tkroman"
ThisBuild / publishMavenStyle := true
ThisBuild / licenses := Seq(
"MIT" -> url("https://github.com/tkroman/puree/blob/master/LICENSE")
)
ThisBuild / sonatypeProjectHosting := Some(
GitHubHosting("tkroman", "puree", "[email protected]")
)
lazy val testSettings = Seq(
libraryDependencies ++= Seq(
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) =>
"org.scalatest" % "scalatest_2.13.0-RC3" % "3.1.0-SNAP12" % Test
case _ =>
"org.scalatest" %% "scalatest" % "3.1.0-SNAP12" % Test
}
),
ThisBuild / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) | Some((2, 12)) => Seq.empty
case _ =>
Seq(
"-encoding",
"utf-8",
"-explaintypes",
"-feature",
"-language:existentials",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xcheckinit",
// "-Xsource:2.14", // too quirky
"-Xlint:adapted-args",
"-Xlint:constant",
"-Xlint:delayedinit-select",
"-Xlint:doc-detached",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:nullary-override",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Xlint:nonlocal-return",
"-Xlint:valpattern",
"-Xlint:eta-zero",
"-Xlint:eta-sam",
"-Xlint:deprecation",
"-Werror",
"-Wdead-code",
"-Wextra-implicit",
"-Wself-implicit",
"-Wnumeric-widen",
"-Woctal-literal",
"-Wunused:implicits",
"-Wunused:locals",
"-Wunused:params",
"-Wunused:patvars",
"-Wunused:privates",
"-Wunused:imports",
"-Wunused:privates",
"-Wunused:explicits",
"-Wunused:linted",
"-Wvalue-discard",
)
}
},
publish / skip := true
)
lazy val pureeRoot = (project in file("."))
.aggregate(puree, pureeApi, pureeTests)
.settings(
publish / skip := true,
publishArtifact := false
)
lazy val pureeApi = (project in file("puree-api"))
.settings(
name := "puree-api",
crossScalaVersions := supportedScalaVersions,
publishTo := sonatypePublishTo.value,
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Test
),
sonatypeProjectHosting := Some(
GitHubHosting("tkroman", "puree", "[email protected]")
),
publishMavenStyle := true,
pomIncludeRepository := { _ =>
false
}
)
lazy val puree = (project in file("puree"))
.dependsOn(pureeApi)
.settings(
name := "puree",
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= Seq(
scalaOrganization.value % "scala-compiler" % scalaVersion.value
),
publishTo := sonatypePublishTo.value,
publishMavenStyle := true,
pomIncludeRepository := { _ =>
false
},
sonatypeProjectHosting := Some(
GitHubHosting("tkroman", "puree", "[email protected]")
)
)
lazy val pureeTests = (project in file("puree-tests"))
.dependsOn(puree, pureeApi)
.settings(
name := "puree-tests",
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= Seq(
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Test
),
fork in Test := true
)
.settings(testSettings)