@@ -18,29 +18,44 @@ import Keys._
18
18
object BuildSettings {
19
19
20
20
// Basic settings for our app
21
- lazy val basicSettings = Seq [ Setting [_]] (
21
+ lazy val basicSettings = Seq (
22
22
organization := " com.snowplowanalytics" ,
23
- version := " 0.4.1" ,
24
- description := " Kinesis LZO sink for S3" ,
25
23
scalaVersion := " 2.11.11" ,
26
- scalacOptions := Seq (" -deprecation" , " -encoding" , " utf8" ,
27
- " -feature" , " -target:jvm-1.7" ),
28
- scalacOptions in Test := Seq (" -Yrangepos" ),
24
+ scalacOptions := compilerOptions,
29
25
resolvers ++= Dependencies .resolvers
30
26
)
31
27
28
+ lazy val compilerOptions = Seq (
29
+ " -deprecation" ,
30
+ " -encoding" , " UTF-8" ,
31
+ " -feature" ,
32
+ " -language:existentials" ,
33
+ " -language:higherKinds" ,
34
+ " -language:implicitConversions" ,
35
+ " -unchecked" ,
36
+ " -Yno-adapted-args" ,
37
+ " -Ywarn-dead-code" ,
38
+ " -Ywarn-numeric-widen" ,
39
+ " -Xfuture" ,
40
+ " -Xlint"
41
+ )
42
+
32
43
// Makes our SBT app settings available from within the app
33
- lazy val scalifySettings = Seq (sourceGenerators in Compile <+= (sourceManaged in Compile , version, name, organization) map { (d, v, n, o) =>
34
- val file = d / " settings.scala"
35
- IO .write(file, """ package com.snowplowanalytics.snowplow.storage.kinesis.s3.generated
36
- |object Settings {
37
- | val organization = "%s"
38
- | val version = "%s"
39
- | val name = "%s"
40
- |}
41
- |""" .stripMargin.format(o, v, n))
42
- Seq (file)
43
- })
44
+ lazy val scalifySettings = Seq (
45
+ sourceGenerators in Compile += Def .task {
46
+ val file = (sourceManaged in Compile ).value / " settings.scala"
47
+ IO .write(file, """ package com.snowplowanalytics.snowplow.storage.kinesis.s3.generated
48
+ |object Settings {
49
+ | val organization = "%s"
50
+ | val version = "%s"
51
+ | val name = "%s"
52
+ |}
53
+ |""" .stripMargin.format(organization.value, version.value, name.value))
54
+ Seq (file)
55
+ }.taskValue
56
+ )
57
+
58
+ lazy val buildSettings = basicSettings ++ scalifySettings
44
59
45
60
// sbt-assembly settings for building a fat jar
46
61
import sbtassembly .Plugin ._
@@ -63,6 +78,4 @@ object BuildSettings {
63
78
64
79
assemblyOption in assembly ~= { _.copy(cacheOutput = false ) }
65
80
)
66
-
67
- lazy val buildSettings = basicSettings ++ scalifySettings ++ sbtAssemblySettings
68
81
}
0 commit comments