Skip to content

Commit a687a36

Browse files
authored
Merge pull request #177 from tpolecat/scala-3.0.0-RC3
Scala 3.0.0
2 parents ac6d154 + 15438d0 commit a687a36

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")
55

66
val commonSettings = Seq(
77
scalaVersion in ThisBuild := "2.12.12",
8-
crossScalaVersions := Seq("2.11.12", "2.12.12", "2.13.5", "3.0.0-RC1"),
8+
crossScalaVersions := Seq("2.11.12", "2.12.12", "2.13.5", "3.0.0"),
99

1010
parallelExecution in ThisBuild := false,
1111
fork := true,
1212

1313
scalacOptions ++= {
14-
if (isDotty.value) Seq(
14+
if (isDotty.value) Seq(
1515
"-unchecked",
1616
"-deprecation",
1717
"-language:_",
18-
"-encoding", "UTF-8",
18+
"-encoding", "UTF-8",
1919
"-source:3.0-migration"
2020
) else Seq(
2121
"-unchecked",

project/Dependencies.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ object Dependencies {
1515
private val testcontainersVersion = "1.15.3"
1616
private val seleniumVersion = "2.53.1"
1717
private val slf4jVersion = "1.7.25"
18-
private val scalaTestVersion = "3.2.5"
19-
private val scalaTestMockitoVersion = "3.2.5.0"
18+
private val scalaTestVersion = "3.2.9"
19+
private val scalaTestMockitoVersion = "3.2.9.0"
2020
private val scalaTestSeleniumVersion_scala2 = "3.2.2.0"
21-
private val scalaTestSeleniumVersion_scala3 = "3.2.5.0"
21+
private val scalaTestSeleniumVersion_scala3 = "3.2.9.0"
2222
private val junitVersion = "4.13.1"
23-
private val munitVersion = "0.7.22"
23+
private val munitVersion = "0.7.25"
2424
private val mysqlConnectorVersion = "5.1.42"
2525
private val neo4jConnectorVersion = "4.0.0"
2626
private val oracleDriverVersion = "19.3.0.0"

project/Plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
22
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
33
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")
44
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
5-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
5+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.dimafeng.testcontainers.integration;
2+
3+
import org.testcontainers.images.builder.ImageFromDockerfile;
4+
5+
// workaround for https://github.com/lampepfl/dotty/issues/12586
6+
public class JavaStub {
7+
8+
public ImageFromDockerfile imageFromDockerFileWithFileFromClasspath(String path, String resourcePath) {
9+
return new ImageFromDockerfile().withFileFromClasspath(path, resourcePath);
10+
}
11+
12+
}

test-framework/scalatest/src/test/scala/com/dimafeng/testcontainers/integration/GenericContainerSpec.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.dimafeng.testcontainers.{ForAllTestContainer, GenericContainer}
66
import org.scalatest.flatspec.AnyFlatSpec
77
import org.testcontainers.containers.wait.strategy.Wait
88
import org.testcontainers.images.builder.ImageFromDockerfile
9+
import org.testcontainers.images.builder.traits.ClasspathTrait;
910

1011
import scala.io.Source
1112

@@ -23,7 +24,8 @@ class GenericContainerSpec extends AnyFlatSpec with ForAllTestContainer {
2324
}
2425

2526
class GenericContainerDockerFileSpec extends GenericContainerSpec {
26-
private val imageFromDockerfile = new ImageFromDockerfile().withFileFromClasspath("Dockerfile", "generic-container-dockerfile")
27+
// we can't do this in Scala 3 due to https://github.com/lampepfl/dotty/issues/12586 so this is delegated to a small Java class.
28+
private val imageFromDockerfile = new JavaStub().imageFromDockerFileWithFileFromClasspath("Dockerfile", "generic-container-dockerfile")
2729
override val container: GenericContainer = GenericContainer(imageFromDockerfile,
2830
exposedPorts = Seq(80),
2931
waitStrategy = Wait.forHttp("/")

0 commit comments

Comments
 (0)