Skip to content

Commit 024bb5b

Browse files
Update sbt to 1.3.0 (#49)
* Update sbt to the latest 1.3.0 * Rework the projects build definition * Update all plugins * Update all deps * Make sbt files compliant with new DSL * Fix modules names * Update default Scala version * Drop JDK 7 from CI
1 parent ab68459 commit 024bb5b

File tree

10 files changed

+65
-74
lines changed

10 files changed

+65
-74
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: scala
22
matrix:
33
include:
44
- scala: 2.10.7
5-
jdk: openjdk7
5+
jdk: openjdk8
66
dist: trusty
77
- scala: 2.11.12
88
jdk: openjdk8

build.sbt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
2+
import pl.project13.scala.sbt.JmhPlugin
3+
import sbt._
4+
5+
lazy val root = (project in file("."))
6+
.aggregate(bloomFilter, tests, examples)
7+
.configs(Configs.all)
8+
.settings(name := "bloom-filter-root", Settings.root)
9+
.enablePlugins()
10+
11+
lazy val bloomFilter = (project in file("bloom-filter"))
12+
.configs(Configs.all)
13+
.settings(name := "bloom-filter", Settings.bloomfilter)
14+
15+
lazy val sandbox = (project in file("sandbox"))
16+
.dependsOn(bloomFilter)
17+
.configs(Configs.all)
18+
.settings(Settings.sandbox)
19+
20+
lazy val sandboxApp = (project in file("sandboxApp"))
21+
.dependsOn(bloomFilter)
22+
.configs(Configs.all)
23+
.settings(Settings.sandboxApp)
24+
.enablePlugins(JavaAppPackaging)
25+
26+
lazy val tests = (project in file("tests"))
27+
.dependsOn(bloomFilter, sandbox)
28+
.configs(Configs.all)
29+
.settings(Settings.tests)
30+
31+
lazy val benchmarks = (project in file("benchmarks"))
32+
.dependsOn(bloomFilter, sandbox)
33+
.configs(Configs.all)
34+
.settings(Settings.benchmarks)
35+
.enablePlugins(JmhPlugin)
36+
37+
lazy val examples = (project in file("examples"))
38+
.dependsOn(bloomFilter)
39+
.configs(Configs.all)
40+
.settings(Settings.examples)
41+
.enablePlugins(JavaAppPackaging)

project/Configs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import sbt._
22

33
object Configs {
44
val EndToEndTest = config("endToEnd") extend Runtime
5-
val all = Seq(EndToEndTest)
5+
val all = EndToEndTest
66
}

project/Dependencies.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import sbt._
33

44
object Dependencies {
55
private val scalatest = "org.scalatest" %% "scalatest" % "3.1.1" % "test;endToEnd"
6-
private val scalacheck = "org.scalacheck" %% "scalacheck" % "1.14.0" % "test"
6+
private val scalacheck = "org.scalacheck" %% "scalacheck" % "1.14.3" % "test"
77
private val googleGuava = "com.google.guava" % "guava" % "19.0"
88
private val googleFindbugs = "com.google.code.findbugs" % "jsr305" % "2.0.3" // needed by guava
9-
private val breeze = "org.scalanlp" %% "breeze" % "0.12"
10-
private val breezeNatives = "org.scalanlp" %% "breeze-natives" % "0.12"
11-
private val algebird = "com.twitter" %% "algebird-core" % "0.11.0"
9+
private val breeze = "org.scalanlp" %% "breeze" % "1.0"
10+
private val breezeNatives = "org.scalanlp" %% "breeze-natives" % "1.0"
11+
private val algebird = "com.twitter" %% "algebird-core" % "0.13.6"
1212
private val sketches = "com.yahoo.datasketches" % "sketches-core" % "0.3.2"
1313
private val chronicleBytes = "net.openhft" % "chronicle-bytes" % "1.2.3"
1414
private val allocationInstrumenter = "com.google.code.java-allocation-instrumenter" % "java-allocation-instrumenter" % "3.0.1"

project/Publishing.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.typesafe.sbt.pgp.PgpSettings._
21
import sbt.Keys._
32
import sbt._
43

@@ -11,13 +10,9 @@ object Publishing {
1110
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
1211
)
1312

14-
private lazy val pgpSettings =
15-
Option(System.getenv().get("PGP_PASSPHRASE"))
16-
.map(s => pgpPassphrase := Some(s.toCharArray)).toSeq
17-
1813
private lazy val sharedSettings = Seq(
1914
publishMavenStyle := true,
20-
publishArtifact in Test := false,
15+
Test / publishArtifact := false,
2116
pomIncludeRepository := Function.const(false),
2217
publishTo := {
2318
val nexus = "https://oss.sonatype.org/"
@@ -35,7 +30,7 @@ object Publishing {
3530
developers := List(Developer("AlexandrNikitin", "Alexandr Nikitin", "nikitin.alexandr.a@gmail.com", url("https://github.com/alexandrnikitin/")))
3631
)
3732

38-
lazy val settings = generalSettings ++ sharedSettings ++ credentialSettings ++ pgpSettings
33+
lazy val settings = generalSettings ++ sharedSettings ++ credentialSettings
3934

4035
lazy val noPublishSettings = Seq(
4136
publish :=(),

project/Settings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import sbt.Keys._
44
object Settings {
55

66
private lazy val build = Seq(
7-
scalaVersion := "2.12.2",
7+
scalaVersion := "2.12.11",
88
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.11", "2.13.1"),
99

1010
autoCompilerPlugins := true,

project/Testing.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ object Testing {
88
import Configs._
99

1010
private lazy val testSettings = Seq(
11-
fork in Test := false,
12-
parallelExecution in Test := false,
13-
testOptions in Test += Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "2")
11+
Test / fork := false,
12+
Test / parallelExecution := false,
13+
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "2")
1414
)
1515

1616
private lazy val e2eSettings = inConfig(EndToEndTest)(Defaults.testSettings) ++ Seq(
17-
fork in EndToEndTest := false,
18-
parallelExecution in EndToEndTest := false,
19-
scalaSource in EndToEndTest := baseDirectory.value / "src/endToEnd/scala"
17+
EndToEndTest / fork := false,
18+
EndToEndTest / parallelExecution := false,
19+
EndToEndTest / scalaSource := baseDirectory.value / "src/endToEnd/scala"
2020
)
2121

2222
private lazy val testAllSettings = Seq(
2323
testAll :=(),
24-
testAll <<= testAll.dependsOn(test in EndToEndTest),
25-
testAll <<= testAll.dependsOn(test in Test)
24+
testAll := testAll.dependsOn(EndToEndTest / test),
25+
testAll := testAll.dependsOn(Test / test)
2626
)
2727

2828
private lazy val scoverageSettings = Seq(

project/TheBuild.scala

Lines changed: 0 additions & 45 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.13
1+
sbt.version = 1.3.0

project/plugins.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
logLevel := Level.Warn
22

3-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0-RC2")
3+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
44

5-
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.21")
5+
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
66

7-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
7+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
88

9-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
9+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
1010

11-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.1")
11+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.0")
1212

13-
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "1.1.1")
13+
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")

0 commit comments

Comments
 (0)