-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
90 lines (80 loc) · 3.39 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
organization in Global := "com.quadas"
name in Global := "konfig"
scalaVersion in Global := "2.12.3"
crossScalaVersions in Global := Seq("2.11.11", "2.12.3")
lazy val root = project.in(file("."))
.settings(publish := {})
.settings(publishLocal := {})
.aggregate(konfig, `konfig-twitter-util`)
lazy val konfig = project
.settings(name := "konfig")
.settings(commonSettings)
.settings(coreDependencies)
.settings(wartSettings)
.settings(publishSettings)
lazy val `konfig-twitter-util` = project
.settings(name := "konfig-twitter-util")
.settings(commonSettings)
.settings(twitterUtilDependencies)
.settings(wartSettings)
.settings(publishSettings)
.dependsOn(konfig)
lazy val commonSettings = Seq(
scalacOptions := Seq(
"-deprecation" // Emit warning and location for usages of deprecated APIs
, "-encoding", "UTF-8"
, "-feature" // Emit warning and location for usages of features that should be imported explicitly
, "-unchecked" // Enable additional warnings where generated code depends on assumptions
// , "-Xfatal-warnings" // Fail the compilation if there are any warnings
, "-Xfuture" // Turn on future language features
, "-Xlint" // Enable specific warnings (see `scalac -Xlint:help`)
, "-Yno-adapted-args" // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver
, "-Ywarn-dead-code" // Warn when dead code is identified
, "-Ywarn-inaccessible" // Warn about inaccessible types in method signatures
, "-Ywarn-infer-any" // Warn when a type argument is inferred to be `Any`
, "-Ywarn-nullary-override" // Warn when non-nullary `def f()' overrides nullary `def f'
, "-Ywarn-nullary-unit" // Warn when nullary methods return Unit
, "-Ywarn-numeric-widen" // Warn when numerics are widened
, "-Ywarn-unused" // Warn when local and private vals, vars, defs, and types are unused
, "-Ywarn-unused-import" // Warn when imports are unused
, "-Ywarn-value-discard" // Warn when non-Unit expression results are unused
)
)
libraryDependencies in Global ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.5" % "test",
"org.scalatest" %% "scalatest" % "3.0.4" % "test"
)
lazy val coreDependencies = Seq(
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.3.1",
"com.chuusai" %% "shapeless" % "2.3.2"
)
)
lazy val twitterUtilDependencies = Seq(
libraryDependencies ++= Seq(
"com.twitter" %% "util-core" % "7.0.0"
)
)
lazy val wartSettings = Seq(
wartremoverErrors := Warts.allBut()
)
lazy val publishSettings = Seq(
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
bintrayRepository := "maven",
bintrayOrganization := Some("quadas"),
bintrayReleaseOnPublish := false,
pomExtra := {
<url>https://github.com/quadas/konfig</url>
<scm>
<connection>scm:git:https://github.com/quadas/konfig.git</connection>
<developerConnection>scm:git:https://github.com/quadas/konfig.git</developerConnection>
<url>https://github.com/quadas/konfig</url>
</scm>
<developers>
<developer>
<name>Yan Su</name>
<email>yan.su@quadas.com</email>
</developer>
</developers>
}
)