This repository has been archived by the owner on Feb 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
81 lines (77 loc) · 2.64 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
import scalariform.formatter.preferences._
val scala210 = "2.10.6"
val scala211 = "2.11.11"
val scala212 = "2.12.2"
val coreName = "scalajswarts"
val wartremoverVersion = "2.1.0"
val wartHelpersVersion = "0.3.0"
lazy val commonSettings = Seq(
organization := "org.danielnixon",
licenses := Seq("The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
version := "0.6.0-SNAPSHOT",
publishMavenStyle := true,
publishArtifact in Test := false,
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")
},
homepage := Some(url("https://github.com/danielnixon/scalajswarts")),
pomExtra := {
<scm>
<url>git@github.com:danielnixon/scalajswarts.git</url>
<connection>scm:git:git@github.com:danielnixon/scalajswarts.git</connection>
</scm>
<developers>
<developer>
<id>danielnixon</id>
<name>Daniel Nixon</name>
<url>https://danielnixon.org/</url>
</developer>
</developers>
},
scalariformPreferences := scalariformPreferences.value
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true),
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-inaccessible",
"-Ywarn-value-discard",
"-Ywarn-numeric-widen",
"-Ywarn-nullary-override")
)
lazy val core = Project(
id = "core",
base = file("core")
).settings(commonSettings ++ Seq(
name := coreName,
scalaVersion := scala211,
crossScalaVersions := Seq(scala211, scala212),
libraryDependencies ++= Seq(
"org.wartremover" %% "wartremover" % wartremoverVersion,
"org.danielnixon" %% "wart-helpers" % wartHelpersVersion
),
scalacOptions ++= Seq("-Xlint:_", "-Ywarn-unused", "-Ywarn-unused-import")
): _*)
lazy val sbtPlug: Project = Project(
id = "sbt-plugin",
base = file("sbt-plugin")
).enablePlugins(
BuildInfoPlugin
).settings(commonSettings ++ Seq(
buildInfoKeys := Seq[BuildInfoKey](version, organization, isSnapshot, "artifactID" -> coreName, scalaVersion),
buildInfoPackage := s"${organization.value}.$coreName",
sbtPlugin := true,
name := s"sbt-$coreName",
scalaVersion := scala210,
addSbtPlugin("org.wartremover" %% "sbt-wartremover" % wartremoverVersion),
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.17"),
libraryDependencies += "org.danielnixon" %% "wart-helpers-sbt" % wartHelpersVersion,
scalacOptions += "-Xlint"
): _*)