Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit c635b6f

Browse files
etspacemanmarkglh
authored andcommitted
Updating packages, adding new configuration for KCL (#56)
* Updating packages, adding new configuration for KCL * Updating to SBT 1.1.1, upgrading plugins, using scalafmt plugin compatible w/ 1.1.1 * Upgrading docker-compose, downgrading KCL due to kinesisalite issue * Removing KCL 1.9.0 config references, fixing travis scalafmt::test ref * Excluding older jgit packages * Updates travis to use 2.12.5
1 parent 6ae4b06 commit c635b6f

File tree

12 files changed

+143
-186
lines changed

12 files changed

+143
-186
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22
language: scala
33
scala:
44
- 2.11.11
5-
- 2.12.4
5+
- 2.12.5
66
jdk:
77
- oraclejdk8
88
cache:
@@ -15,7 +15,7 @@ before_script:
1515
- docker-compose -f localstack/docker-compose.yml up -d
1616
- docker ps -a
1717
script:
18-
- sbt ++$TRAVIS_SCALA_VERSION clean coverage scalafmtTest test it:test
18+
- sbt ++$TRAVIS_SCALA_VERSION clean coverage scalafmt::test test it:test
1919
# Tagged releases
2020
- if [ $TRAVIS_TEST_RESULT -eq 0 -a "$TRAVIS_PULL_REQUEST" = "false" ] && [[ "$TRAVIS_TAG"
2121
=~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?(-M[0-9]+)?$ ]]; then echo "** Publishing Release
@@ -36,7 +36,7 @@ before_cache:
3636
- find $HOME/.sbt -name "*.lock" -print -delete
3737
env:
3838
global:
39-
- DOCKER_COMPOSE_VERSION=1.17.1
39+
- DOCKER_COMPOSE_VERSION=1.19.0
4040
- secure: KffThTeOg0ELt+iw5ZNtDW6x4/1iKIj1v91Yq6earF+YQquusROqt/MtdmyXRG9ho0c/xnB82BJHrBsvac6SwsPUZ/cRvQ0KML3bWyCMCL2B/SurhjxbahAWdgQGj67KO1n72q24cqyRMb9wCCOwy4p/7qomBYM+m8YRLc6YOxxj6DKriIiqOq8j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qtdGLl6z0gdI5rLZIYO7SMeRPjTYf/5NV/WxF2LcJu06LHYpzURaGQHp6T5NH2eEZof1Dt5tqa2eQ7KfZyui3rz3WB0AQlJSPK9yL78BvZzNlCNWbv5wLiW6hQ=
4242
before_install:

build.sbt

Lines changed: 87 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
lazy val `reactive-kinesis` =
66
project
77
.in(file("."))
8-
.enablePlugins(AutomateHeaderPlugin, GitVersioning)
8+
.enablePlugins(AutomateHeaderPlugin, GitVersioning, ScalafmtCorePlugin)
99
.settings(settings)
1010
.configs(IntegrationTest)
1111
.settings(Defaults.itSettings: _*)
1212
.settings(
1313
libraryDependencies ++=
1414
library.jackson ++ library.amazon ++ library.lightbend ++
15-
library.logback ++ library.testing
15+
library.logback ++ library.testing
1616
)
1717

1818
// *****************************************************************************
@@ -24,47 +24,48 @@ lazy val library =
2424

2525
object Version {
2626
val scalaCheck = "1.13.5"
27-
val scalaTest = "3.0.3"
28-
val jackson = "2.8.7"
29-
val akka = "2.5.7"
27+
val scalaTest = "3.0.5"
28+
val jackson = "2.9.4"
29+
val akka = "2.5.11"
3030
}
3131

3232
val jackson = Seq(
3333
//We need jackson versions to be consistent, KCL&KPL pull in slightly older versions which often get evicted
3434
//See: https://github.com/aws/aws-sdk-java/issues/999
35-
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % Version.jackson % Compile,
36-
"com.fasterxml.jackson.core" % "jackson-databind" % Version.jackson % Compile,
37-
"com.fasterxml.jackson.core" % "jackson-core" % Version.jackson % Compile,
38-
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.8.0" % Compile,
39-
"com.fasterxml.uuid" % "java-uuid-generator" % "3.1.4" % Compile)
35+
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % Version.jackson % Compile,
36+
"com.fasterxml.jackson.core" % "jackson-databind" % Version.jackson % Compile,
37+
"com.fasterxml.jackson.core" % "jackson-core" % Version.jackson % Compile,
38+
"com.fasterxml.jackson.core" % "jackson-annotations" % Version.jackson % Compile,
39+
"com.fasterxml.uuid" % "java-uuid-generator" % "3.1.5" % Compile
40+
)
4041

4142
val amazon = Seq(
42-
"com.amazonaws" % "amazon-kinesis-client" % "1.8.8" % Compile
43-
excludeAll(
44-
ExclusionRule(organization = "com.fasterxml.jackson.core"),
45-
ExclusionRule(organization = "com.fasterxml.jackson.dataformat")),
46-
"com.amazonaws" % "amazon-kinesis-producer" % "0.12.8" % Compile
47-
excludeAll(
48-
ExclusionRule(organization = "com.fasterxml.jackson.core"),
49-
ExclusionRule(organization = "com.fasterxml.jackson.dataformat"))
43+
// TODO: Upgrade this to 1.9.x when this issue is resolved and exposed in localstack:
44+
// https://github.com/mhart/kinesalite/issues/59
45+
"com.amazonaws" % "amazon-kinesis-client" % "1.8.10" % Compile
46+
excludeAll (ExclusionRule(organization = "com.fasterxml.jackson.core"),
47+
ExclusionRule(organization = "com.fasterxml.jackson.dataformat")),
48+
"com.amazonaws" % "amazon-kinesis-producer" % "0.12.8" % Compile
49+
excludeAll (ExclusionRule(organization = "com.fasterxml.jackson.core"),
50+
ExclusionRule(organization = "com.fasterxml.jackson.dataformat"))
5051
)
5152

5253
val lightbend = Seq(
53-
"com.typesafe" % "config" % "1.3.1" % Compile,
54-
"com.typesafe.akka" %% "akka-actor" % Version.akka % Compile,
55-
"com.typesafe.akka" %% "akka-stream" % Version.akka % Compile,
56-
"com.typesafe.scala-logging" %% "scala-logging" % "3.5.0" % Compile
57-
)
54+
"com.typesafe" % "config" % "1.3.3" % Compile,
55+
"com.typesafe.akka" %% "akka-actor" % Version.akka % Compile,
56+
"com.typesafe.akka" %% "akka-stream" % Version.akka % Compile,
57+
"com.typesafe.scala-logging" %% "scala-logging" % "3.8.0" % Compile
58+
)
5859

5960
val logback = Seq(
60-
"ch.qos.logback" % "logback-classic" % "1.1.11" % Compile
61+
"ch.qos.logback" % "logback-classic" % "1.2.3" % Compile
6162
)
6263

6364
val testing = Seq(
64-
"org.scalatest" %% "scalatest" % Version.scalaTest % "it,test",
65-
"org.scalacheck" %% "scalacheck" % Version.scalaCheck % "it,test",
66-
"com.typesafe.akka" %% "akka-testkit" % Version.akka % "it,test",
67-
"org.mockito" % "mockito-core" % "2.7.15" % "it,test"
65+
"org.scalatest" %% "scalatest" % Version.scalaTest % "it,test",
66+
"org.scalacheck" %% "scalacheck" % Version.scalaCheck % "it,test",
67+
"com.typesafe.akka" %% "akka-testkit" % Version.akka % "it,test",
68+
"org.mockito" % "mockito-core" % "2.16.0" % "it,test"
6869
)
6970
}
7071

@@ -73,9 +74,9 @@ lazy val library =
7374
// *****************************************************************************
7475

7576
lazy val settings =
76-
commonSettings ++
77-
headerSettings ++
78-
versioningSettings
77+
commonSettings ++
78+
headerSettings ++
79+
versioningSettings
7980

8081
lazy val commonSettings =
8182
Seq(
@@ -84,50 +85,53 @@ lazy val commonSettings =
8485
organization := "com.weightwatchers",
8586
mappings.in(Compile, packageBin) += baseDirectory.in(ThisBuild).value / "LICENSE" -> "LICENSE",
8687
scalacOptions ++= Seq( //http://tpolecat.github.io/2017/04/25/scalac-flags.html
87-
"-deprecation", // Emit warning and location for usages of deprecated APIs.
88-
"-encoding", "utf-8", // Specify character encoding used by source files.
89-
"-explaintypes", // Explain type errors in more detail.
90-
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
91-
"-language:existentials", // Existential types (besides wildcard types) can be written and inferred
92-
"-language:experimental.macros", // Allow macro definition (besides implementation and application)
93-
"-language:higherKinds", // Allow higher-kinded types
94-
"-language:implicitConversions", // Allow definition of implicit functions called views
95-
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
96-
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
97-
"-Xfatal-warnings", // Fail the compilation if there are any warnings.
98-
"-Xfuture", // Turn on future language features.
99-
"-Xlint:adapted-args", // Warn if an argument list is modified to match the receiver.
100-
"-Xlint:by-name-right-associative", // By-name parameter of right associative operator.
101-
"-Xlint:delayedinit-select", // Selecting member of DelayedInit.
102-
"-Xlint:doc-detached", // A Scaladoc comment appears to be detached from its element.
103-
"-Xlint:inaccessible", // Warn about inaccessible types in method signatures.
104-
"-Xlint:infer-any", // Warn when a type argument is inferred to be `Any`.
105-
"-Xlint:missing-interpolator", // A string literal appears to be missing an interpolator id.
106-
"-Xlint:nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
107-
"-Xlint:nullary-unit", // Warn when nullary methods return Unit.
108-
"-Xlint:option-implicit", // Option.apply used implicit view.
109-
"-Xlint:package-object-classes", // Class or object defined in package object.
110-
"-Xlint:poly-implicit-overload", // Parameterized overloaded implicit methods are not visible as view bounds.
111-
"-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field.
112-
"-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component.
113-
"-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope.
114-
"-Xlint:unsound-match", // Pattern match may not be typesafe.
115-
"-Yno-adapted-args", // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver.
116-
"-Ypartial-unification", // Enable partial unification in type constructor inference
117-
"-Ywarn-dead-code", // Warn when dead code is identified.
118-
"-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
119-
"-Ywarn-infer-any", // Warn when a type argument is inferred to be `Any`.
120-
"-Ywarn-nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
121-
"-Ywarn-nullary-unit", // Warn when nullary methods return Unit.
122-
"-Ywarn-numeric-widen" // Warn when numerics are widened.
88+
"-deprecation", // Emit warning and location for usages of deprecated APIs.
89+
"-encoding",
90+
"utf-8", // Specify character encoding used by source files.
91+
"-explaintypes", // Explain type errors in more detail.
92+
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
93+
"-language:existentials", // Existential types (besides wildcard types) can be written and inferred
94+
"-language:experimental.macros", // Allow macro definition (besides implementation and application)
95+
"-language:higherKinds", // Allow higher-kinded types
96+
"-language:implicitConversions", // Allow definition of implicit functions called views
97+
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
98+
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
99+
"-Xfatal-warnings", // Fail the compilation if there are any warnings.
100+
"-Xfuture", // Turn on future language features.
101+
"-Xlint:adapted-args", // Warn if an argument list is modified to match the receiver.
102+
"-Xlint:by-name-right-associative", // By-name parameter of right associative operator.
103+
"-Xlint:delayedinit-select", // Selecting member of DelayedInit.
104+
"-Xlint:doc-detached", // A Scaladoc comment appears to be detached from its element.
105+
"-Xlint:inaccessible", // Warn about inaccessible types in method signatures.
106+
"-Xlint:infer-any", // Warn when a type argument is inferred to be `Any`.
107+
"-Xlint:missing-interpolator", // A string literal appears to be missing an interpolator id.
108+
"-Xlint:nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
109+
"-Xlint:nullary-unit", // Warn when nullary methods return Unit.
110+
"-Xlint:option-implicit", // Option.apply used implicit view.
111+
"-Xlint:package-object-classes", // Class or object defined in package object.
112+
"-Xlint:poly-implicit-overload", // Parameterized overloaded implicit methods are not visible as view bounds.
113+
"-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field.
114+
"-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component.
115+
"-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope.
116+
"-Xlint:unsound-match", // Pattern match may not be typesafe.
117+
"-Yno-adapted-args", // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver.
118+
"-Ypartial-unification", // Enable partial unification in type constructor inference
119+
"-Ywarn-dead-code", // Warn when dead code is identified.
120+
"-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
121+
"-Ywarn-infer-any", // Warn when a type argument is inferred to be `Any`.
122+
"-Ywarn-nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
123+
"-Ywarn-nullary-unit", // Warn when nullary methods return Unit.
124+
"-Ywarn-numeric-widen" // Warn when numerics are widened.
123125
),
124126
scalacOptions in (Compile, doc) ++= Seq(
125127
"-no-link-warnings" // Suppresses problems with Scaladoc @throws links
126128
),
127-
scalacOptions in (Compile, console) ~= (_.filterNot(Set(
128-
"-Ywarn-unused:imports",
129-
"-Xfatal-warnings"
130-
))),
129+
scalacOptions in (Compile, console) ~= (_.filterNot(
130+
Set(
131+
"-Ywarn-unused:imports",
132+
"-Xfatal-warnings"
133+
)
134+
)),
131135
unmanagedSourceDirectories.in(Compile) := Seq(scalaSource.in(Compile).value),
132136
unmanagedSourceDirectories.in(Test) := Seq(scalaSource.in(Test).value),
133137
shellPrompt in ThisBuild := { state =>
@@ -138,7 +142,10 @@ lazy val commonSettings =
138142
parallelExecution in IntegrationTest := false,
139143
fork in IntegrationTest := true,
140144
javaOptions in IntegrationTest += "-Dcom.amazonaws.sdk.disableCertChecking=true",
141-
envVars in IntegrationTest += ("AWS_CBOR_DISABLE" -> "true")
145+
envVars in IntegrationTest += ("AWS_CBOR_DISABLE" -> "true"),
146+
scalafmtOnCompile := true,
147+
scalafmtTestOnCompile := true,
148+
scalafmtVersion := "1.3.0"
142149
)
143150

144151
/* This allows to derive an sbt version string from the git information.
@@ -149,29 +156,28 @@ lazy val commonSettings =
149156
* ELSE IF the latest found tag is "vX.Y.Z", the version is "X.Y.Z-commitsSinceVersion-gCommitHash-SNAPSHOT"
150157
* ELSE the version is "0.0.0-commitHash-SNAPSHOT"
151158
*/
152-
val VersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r
159+
val VersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r
153160
val MilestoneRegex = "^M[0-9]$".r
154161
lazy val versioningSettings =
155162
Seq(
156163
git.baseVersion := "0.0.0",
157164
git.useGitDescribe := true,
158165
git.uncommittedSignifier := None,
159166
git.gitTagToVersionNumber := {
160-
case VersionRegex(v, "") => Some(v) //e.g. 1.0.0
161-
case VersionRegex(v, s)
162-
if MilestoneRegex.findFirstIn(s).isDefined => Some(s"$v-$s") //e.g. 1.0.0-M1
163-
case VersionRegex(v, "SNAPSHOT") => Some(s"$v-SNAPSHOT") //e.g. 1.0.0-SNAPSHOT
164-
case VersionRegex(v, s) => Some(s"$v-$s-SNAPSHOT") //e.g. 1.0.0-2-commithash-SNAPSHOT
165-
case _ => None
167+
case VersionRegex(v, "") => Some(v) //e.g. 1.0.0
168+
case VersionRegex(v, s) if MilestoneRegex.findFirstIn(s).isDefined =>
169+
Some(s"$v-$s") //e.g. 1.0.0-M1
170+
case VersionRegex(v, "SNAPSHOT") => Some(s"$v-SNAPSHOT") //e.g. 1.0.0-SNAPSHOT
171+
case VersionRegex(v, s) => Some(s"$v-$s-SNAPSHOT") //e.g. 1.0.0-2-commithash-SNAPSHOT
172+
case _ => None
166173
}
167174
)
168175

169-
import de.heikoseeberger.sbtheader.license._
170176
import sbt.Keys.parallelExecution
171177

172178
lazy val headerSettings =
173179
Seq(
174-
headers := Map("scala" -> Apache2_0("2017", "WeightWatchers"))
180+
headerLicense := Some(HeaderLicense.ALv2("2017", "WeightWatchers"))
175181
)
176182

177183
coverageExcludedPackages := "reference.conf"

project/AutomateScalafmtPlugin.scala

Lines changed: 0 additions & 69 deletions
This file was deleted.

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 0.13.15
1+
sbt.version = 1.1.1

0 commit comments

Comments
 (0)