-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from sauliusvl/bump-versions
Bump versions, refactor integration test configuration in sbt
- Loading branch information
Showing
27 changed files
with
98 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,20 @@ name := "stream-loader" | |
|
||
ThisBuild / organization := "com.adform" | ||
ThisBuild / organizationName := "Adform" | ||
ThisBuild / scalaVersion := "2.13.11" | ||
ThisBuild / scalacOptions := Seq("-unchecked", "-deprecation", "-feature", "-encoding", "utf8", "-release", "11") | ||
ThisBuild / scalaVersion := "2.13.13" | ||
ThisBuild / scalacOptions := Seq( | ||
"-unchecked", | ||
"-deprecation", | ||
"-feature", | ||
"-encoding", | ||
"utf8", | ||
"-release", | ||
"11", | ||
"-Wconf:msg=While parsing annotations in:silent" | ||
) | ||
|
||
ThisBuild / startYear := Some(2020) | ||
ThisBuild / licenses += ("MPL-2.0", new URL("http://mozilla.org/MPL/2.0/")) | ||
ThisBuild / licenses += ("MPL-2.0", url("http://mozilla.org/MPL/2.0/")) | ||
|
||
ThisBuild / developers := List( | ||
Developer("sauliusvl", "Saulius Valatka", "[email protected]", url("https://github.com/sauliusvl")) | ||
|
@@ -25,9 +34,9 @@ ThisBuild / git.remoteRepo := { | |
} | ||
} | ||
|
||
val scalaTestVersion = "3.2.16" | ||
val scalaTestVersion = "3.2.18" | ||
val scalaCheckVersion = "1.17.0" | ||
val scalaCheckTestVersion = "3.2.16.0" | ||
val scalaCheckTestVersion = "3.2.18.0" | ||
|
||
lazy val `stream-loader-core` = project | ||
.in(file("stream-loader-core")) | ||
|
@@ -38,24 +47,19 @@ lazy val `stream-loader-core` = project | |
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, git.gitHeadCommit), | ||
libraryDependencies ++= Seq( | ||
"org.scala-lang" % "scala-reflect" % scalaVersion.value, | ||
"org.apache.kafka" % "kafka-clients" % "3.5.1", | ||
"org.apache.kafka" % "kafka-clients" % "3.7.0", | ||
"org.log4s" %% "log4s" % "1.10.0", | ||
"org.apache.commons" % "commons-compress" % "1.21", | ||
"org.xerial.snappy" % "snappy-java" % "1.1.10.3", | ||
"org.apache.commons" % "commons-compress" % "1.26.0", | ||
"org.xerial.snappy" % "snappy-java" % "1.1.10.5", | ||
"org.lz4" % "lz4-java" % "1.8.0", | ||
"com.github.luben" % "zstd-jni" % "1.5.5-5", | ||
"com.github.luben" % "zstd-jni" % "1.5.5-6", | ||
"com.univocity" % "univocity-parsers" % "2.9.1", | ||
"org.json4s" %% "json4s-native" % "4.0.6", | ||
"io.micrometer" % "micrometer-core" % "1.11.2", | ||
"org.json4s" %% "json4s-native" % "4.0.7", | ||
"io.micrometer" % "micrometer-core" % "1.12.3", | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test", | ||
"org.scalatestplus" %% "scalacheck-1-17" % scalaCheckTestVersion % "test", | ||
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test", | ||
"ch.qos.logback" % "logback-classic" % "1.4.8" % "test" | ||
), | ||
testOptions += sbt.Tests.Setup(cl => | ||
cl.loadClass("org.slf4j.LoggerFactory") | ||
.getMethod("getLogger", cl.loadClass("java.lang.String")) | ||
.invoke(null, "ROOT") // Prevents slf4j replay warnings during tests | ||
"ch.qos.logback" % "logback-classic" % "1.5.3" % "test" | ||
) | ||
) | ||
|
||
|
@@ -66,10 +70,11 @@ lazy val `stream-loader-clickhouse` = project | |
.settings( | ||
resolvers += "jitpack" at "https://jitpack.io", | ||
libraryDependencies ++= Seq( | ||
"com.clickhouse" % "clickhouse-jdbc" % "0.4.6", | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test", | ||
"org.scalatestplus" %% "scalacheck-1-17" % scalaCheckTestVersion % "test", | ||
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test" | ||
"org.apache.httpcomponents.client5" % "httpclient5" % "5.3.1", | ||
"com.clickhouse" % "clickhouse-jdbc" % "0.6.0", | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test", | ||
"org.scalatestplus" %% "scalacheck-1-17" % scalaCheckTestVersion % "test", | ||
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test" | ||
) | ||
) | ||
|
||
|
@@ -81,7 +86,7 @@ lazy val `stream-loader-hadoop` = project | |
.settings(commonSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"com.sksamuel.avro4s" %% "avro4s-core" % "4.1.1", | ||
"com.sksamuel.avro4s" %% "avro4s-core" % "4.1.2", | ||
"org.apache.parquet" % "parquet-avro" % parquetVersion, | ||
"org.apache.parquet" % "parquet-protobuf" % parquetVersion, | ||
"org.apache.hadoop" % "hadoop-client" % "3.3.6" exclude ("log4j", "log4j"), | ||
|
@@ -95,14 +100,14 @@ lazy val `stream-loader-s3` = project | |
.settings(commonSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"software.amazon.awssdk" % "s3" % "2.20.119", | ||
"software.amazon.awssdk" % "s3" % "2.25.1", | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test", | ||
"com.amazonaws" % "aws-java-sdk-s3" % "1.12.522" % "test", | ||
"org.gaul" % "s3proxy" % "2.0.0" % "test" | ||
"com.amazonaws" % "aws-java-sdk-s3" % "1.12.671" % "test", | ||
"org.gaul" % "s3proxy" % "2.1.0" % "test" | ||
) | ||
) | ||
|
||
val verticaVersion = "12.0.4-0" | ||
val verticaVersion = "24.1.0-2" | ||
|
||
lazy val `stream-loader-vertica` = project | ||
.in(file("stream-loader-vertica")) | ||
|
@@ -121,32 +126,32 @@ lazy val packAndSplitJars = | |
taskKey[(File, File)]("Runs pack and splits out the application jars from the external dependency jars") | ||
lazy val dockerImage = settingKey[String]("Full docker image name") | ||
|
||
val IntegrationTest = config("it").extend(Test) | ||
|
||
lazy val `stream-loader-tests` = project | ||
.in(file("stream-loader-tests")) | ||
.dependsOn(`stream-loader-clickhouse`) | ||
.dependsOn(`stream-loader-hadoop`) | ||
.dependsOn(`stream-loader-s3`) | ||
.dependsOn(`stream-loader-vertica`) | ||
.configs(IntegrationTest) | ||
.enablePlugins(PackPlugin) | ||
.enablePlugins(DockerPlugin) | ||
.enablePlugins(BuildInfoPlugin) | ||
.settings(Defaults.itSettings: _*) | ||
.settings(headerSettings(IntegrationTest)) | ||
.configs(IntegrationTest) | ||
.settings(commonSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"com.typesafe" % "config" % "1.4.2", | ||
"ch.qos.logback" % "logback-classic" % "1.4.8", | ||
"com.zaxxer" % "HikariCP" % "5.0.1", | ||
"com.typesafe" % "config" % "1.4.3", | ||
"ch.qos.logback" % "logback-classic" % "1.5.3", | ||
"com.zaxxer" % "HikariCP" % "5.1.0", | ||
"com.vertica.jdbc" % "vertica-jdbc" % verticaVersion, | ||
"org.scalacheck" %% "scalacheck" % scalaCheckVersion, | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test,it", | ||
"org.scalatestplus" %% "scalacheck-1-17" % scalaCheckTestVersion % "test,it", | ||
("com.spotify" % "docker-client" % "8.16.0" classifier "shaded") % "it", | ||
"org.slf4j" % "log4j-over-slf4j" % "2.0.7" % "it" | ||
"org.scalatest" %% "scalatest" % scalaTestVersion % "test", | ||
"org.scalatestplus" %% "scalacheck-1-17" % scalaCheckTestVersion % "test", | ||
("com.spotify" % "docker-client" % "8.16.0" classifier "shaded") % "test", | ||
"org.slf4j" % "log4j-over-slf4j" % "2.0.12" % "test" | ||
), | ||
test := {}, // only integration tests present | ||
inConfig(IntegrationTest)(Defaults.testTasks), | ||
publish := {}, | ||
publishLocal := {}, | ||
publish / skip := true, | ||
|
@@ -176,7 +181,7 @@ lazy val `stream-loader-tests` = project | |
val bin = s"/opt/${name.value}/bin/" | ||
|
||
new Dockerfile { | ||
from("eclipse-temurin:11.0.17_8-jre") | ||
from("eclipse-temurin:21.0.2_13-jre") | ||
|
||
env("APP_CLASS_PATH" -> s"$lib/*") | ||
|
||
|
@@ -209,18 +214,20 @@ lazy val `stream-loader-tests` = project | |
) | ||
) | ||
}, | ||
Test / testOptions ++= Seq( | ||
Tests.Argument(TestFrameworks.ScalaTest, "-l", "org.scalatest.tags.Slow") | ||
), | ||
IntegrationTest / test := (IntegrationTest / test).dependsOn(docker).value, | ||
IntegrationTest / testOnly := (IntegrationTest / testOnly).dependsOn(docker).evaluated, | ||
// Prevents slf4j replay warnings during tests | ||
IntegrationTest / testOptions ++= Seq( | ||
IntegrationTest / testOptions := Seq( | ||
sbt.Tests.Setup(cl => | ||
cl.loadClass("org.slf4j.LoggerFactory") | ||
.getMethod("getLogger", cl.loadClass("java.lang.String")) | ||
.invoke(null, "ROOT") | ||
.invoke(null, "ROOT") // Prevents slf4j replay warnings during tests | ||
), | ||
Tests.Argument(TestFrameworks.ScalaTest, "-n", "org.scalatest.tags.Slow"), | ||
Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "3", "-minSuccessfulTests", "10") | ||
), | ||
inConfig(IntegrationTest)(org.scalafmt.sbt.ScalafmtPlugin.scalafmtConfigSettings) | ||
) | ||
) | ||
|
||
lazy val generateDiagrams = taskKey[Seq[File]]("Renders UML diagrams to SVG images") | ||
|
@@ -250,6 +257,13 @@ lazy val commonSettings = Seq( | |
versionScheme := Some("early-semver"), | ||
publishMavenStyle := true, | ||
Test / publishArtifact := false, | ||
Test / testOptions ++= Seq( | ||
sbt.Tests.Setup(cl => | ||
cl.loadClass("org.slf4j.LoggerFactory") | ||
.getMethod("getLogger", cl.loadClass("java.lang.String")) | ||
.invoke(null, "ROOT") // Prevents slf4j replay warnings during tests | ||
) | ||
), | ||
publishTo := sonatypePublishToBundle.value, | ||
homepage := Some(url(gitRepoUrl)), | ||
scmInfo := Some(ScmInfo(url(gitRepoUrl), s"scm:git:[email protected]:$gitRepo.git")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.9.2 | ||
sbt.version=1.9.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always | ||
|
||
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.10.0") | ||
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.11.0") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1") | ||
|
||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.17") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.19") | ||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") | ||
|
||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
|
||
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") | ||
|
||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") | ||
|
||
libraryDependencies += "net.sourceforge.plantuml" % "plantuml" % "1.2023.10" | ||
libraryDependencies += "net.sourceforge.plantuml" % "plantuml" % "1.2024.3" | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") | ||
|
||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.