forked from mrdziuban/scalacheck-magnolia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
65 lines (61 loc) · 2.23 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
import sbtcrossproject.crossProject
lazy val scalaVersions = List("2.12.6", "2.11.12")
lazy val commonSettings = Seq(
organization := "com.mrdziuban",
version := "0.0.2",
addCompilerPlugin("io.tryp" % "splain" % "0.3.1" cross CrossVersion.patch),
crossScalaVersions := scalaVersions,
scalaVersion := crossScalaVersions.value.head,
scalacOptions := Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-infer-any",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-P:splain:all"
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v == 12 =>
Seq(
"-Xlint:-unused,_",
"-Ywarn-unused:imports,privates,locals",
"-Ycache-plugin-class-loader:last-modified",
"-Ycache-macro-class-loader:last-modified"
)
case _ => Seq("-Ywarn-unused-import")
}),
)
lazy val `scalacheck-magnolia` = crossProject(JVMPlatform, JSPlatform)
.in(file("."))
.settings(commonSettings:_*)
.settings(
name := "scalacheck-magnolia",
libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % "1.14.0",
"com.propensive" %%% "magnolia" % "0.10.0"
),
// Publish settings
homepage := Some(url("https://github.com/mrdziuban/scalacheck-magnolia")),
scmInfo := Some(ScmInfo(url("https://github.com/mrdziuban/scalacheck-magnolia"), "git@github.com:mrdziuban/scalacheck-magnolia.git")),
developers := List(Developer("mrdziuban", "Matt Dziuban", "mrdziuban@gmail.com", url("https://github.com/mrdziuban"))),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
publishMavenStyle := true,
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
sonatypeProfileName := "com.mrdziuban"
)
lazy val tut = project
.in(file("tut"))
.settings(commonSettings:_*)
.settings(
scalacOptions := scalacOptions.value.filterNot(_.contains("warn-unused")),
tutTargetDirectory := baseDirectory.value / ".."
)
.dependsOn(`scalacheck-magnolia`.jvm)
.enablePlugins(TutPlugin)