Skip to content

Commit

Permalink
rm scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson committed Sep 21, 2024
1 parent 35ddd09 commit 34ea4cf
Show file tree
Hide file tree
Showing 28 changed files with 1 addition and 1,128 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@ on:
branches: [ master ]

jobs:
scala_2_12:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
- name: Run tests
run: sbt ++2.12.18 test

scala_2_13:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
- name: Run tests
run: sbt ++2.13.12 test

scala_3:

runs-on: ubuntu-latest
Expand Down
30 changes: 1 addition & 29 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ lazy val specs2 = Def.setting("org.specs2" %%% "specs2-core" % "4.20.8")

val commonSettings = Defaults.coreDefaultSettings ++ Seq(
scalaVersion := "3.4.2",
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-release:8")
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-release:8", "-experimental")
)

lazy val scalamock = crossProject(JSPlatform, JVMPlatform) in file(".") settings(
commonSettings,
crossScalaSettings,
name := "scalamock",
Compile / packageBin / publishArtifact := true,
Compile / packageDoc / publishArtifact := true,
Expand All @@ -26,37 +25,10 @@ lazy val scalamock = crossProject(JSPlatform, JVMPlatform) in file(".") settings

lazy val examples = project in file("examples") settings(
commonSettings,
crossScalaSettings,
name := "ScalaMock Examples",
publish / skip := true,
libraryDependencies ++= Seq(
scalatest.value % Test,
specs2.value % Test
)
) dependsOn scalamock.jvm

def crossScalaSettings = {
def addDirsByScalaVersion(path: String): Def.Initialize[Seq[sbt.File]] =
scalaVersion.zip(baseDirectory) { case (v, base) =>
CrossVersion.partialVersion(v) match {
case Some((v, _)) if Set(2L, 3L).contains(v) =>
Seq(base / path / s"scala-$v")
case _ =>
Seq.empty
}
}
Seq(
crossScalaVersions := Seq("2.12.20", "2.13.14", scalaVersion.value),
Compile / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/main").value,
Test / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/test").value,
scalacOptions ++= (if (scalaVersion.value.startsWith("3")) Seq("-experimental") else Nil),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
case _ =>
Seq.empty
}
}
)
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 34ea4cf

Please sign in to comment.