@@ -32,8 +32,9 @@ object BuildSettings {
32
32
33
33
// Basic settings for our app
34
34
lazy val basicSettings = Seq (
35
- organization := " com.snowplowanalytics" ,
36
- scalaVersion := " 2.13.6" ,
35
+ organization := " com.snowplowanalytics" ,
36
+ scalaVersion := " 2.13.6" ,
37
+ description := " Load the contents of a Kinesis stream topic to S3" ,
37
38
resolvers ++= Dependencies .resolvers,
38
39
ThisBuild / dynverVTagPrefix := false ,
39
40
ThisBuild / dynverSeparator := " -"
@@ -42,7 +43,7 @@ object BuildSettings {
42
43
/** Add example config for integration tests */
43
44
lazy val addExampleConfToTestCp = Seq (
44
45
Test / unmanagedClasspath += {
45
- baseDirectory.value / " config"
46
+ baseDirectory.value / " ../../ config"
46
47
}
47
48
)
48
49
@@ -52,11 +53,15 @@ object BuildSettings {
52
53
Docker / packageName := " snowplow/snowplow-s3-loader" ,
53
54
dockerBaseImage := " eclipse-temurin:11-jre-focal" ,
54
55
dockerUpdateLatest := true ,
56
+ )
57
+
58
+ lazy val lzoDockerSettings = Seq (
55
59
dockerCommands := {
56
60
val installLzo = Seq (Cmd (" RUN" , " mkdir -p /var/lib/apt/lists/partial && apt-get update && apt-get install -y lzop && apt-get purge -y" ))
57
61
val (h, t) = dockerCommands.value.splitAt(dockerCommands.value.size- 4 )
58
62
h ++ installLzo ++ t
59
- }
63
+ },
64
+ dockerAlias := dockerAlias.value.withTag(Some (version.value + " -lzo" ))
60
65
)
61
66
62
67
// Makes our SBT app settings available from within the app
@@ -82,10 +87,12 @@ object BuildSettings {
82
87
case PathList (" javax" , " servlet" , xs @ _* ) => MergeStrategy .first
83
88
case PathList (" org" , " objectweb" , " asm" , xs @ _* ) => MergeStrategy .first
84
89
case PathList (" org" , " objectweb" , " asm" , xs @ _* ) => MergeStrategy .first
85
- case PathList (" org" , " apache" , " log4j" , _* ) => MergeStrategy .last // handled by log4j-over-slf4j
90
+ case PathList (" org" , " apache" , " log4j" , _* ) => MergeStrategy .last
91
+ case PathList (" org" , " apache" , " commons" , _* ) => MergeStrategy .last
86
92
case PathList (ps @ _* ) if ps.last endsWith " .html" => MergeStrategy .first
87
93
case " application.conf" => MergeStrategy .concat
88
94
case " module-info.class" => MergeStrategy .discard
95
+ case PathList (" com" , " snowplowanalytics" , " s3" , " loader" , " generated" , _* ) => MergeStrategy .last
89
96
case x =>
90
97
val oldStrategy = (assembly / assemblyMergeStrategy).value
91
98
oldStrategy(x)
@@ -104,4 +111,11 @@ object BuildSettings {
104
111
scalafmtConfig := file(" .scalafmt.conf" ),
105
112
scalafmtOnCompile := false
106
113
)
114
+
115
+ lazy val commonSettings = basicSettings ++ scalifySettings ++ sbtAssemblySettings ++ dockerSettings ++ addExampleConfToTestCp
116
+
117
+ lazy val lzoSettings = lzoDockerSettings ++ Seq (
118
+ Compile / discoveredMainClasses := Seq (),
119
+ Compile / mainClass := Some (" com.snowplowanalytics.s3.loader.lzo.Main" )
120
+ )
107
121
}
0 commit comments