Skip to content

Commit b951b8a

Browse files
Prepare repository for next .github release and SBT build improvements (#4)
* Removes root project * Bumps deps up * Bumps sbt up * Updates command aliases * Moves .docs to docs. Updates sbt module too * Removes sbt-mdoc-toc since it is not being used * Updates sbt plugins * Removes unused defs and vals * Removes cross-compilation with Scala 2.12
1 parent 2dfcf1f commit b951b8a

File tree

10 files changed

+22
-31
lines changed

10 files changed

+22
-31
lines changed

build.sbt

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
ThisBuild / organization := "org.scala-exercises"
22
ThisBuild / githubOrganization := "47degrees"
33
ThisBuild / scalaVersion := V.scala
4-
ThisBuild / crossScalaVersions := Seq(V.scala212, V.scala)
54

6-
addCommandAlias("ci-test", ";scalafmtCheckAll; scalafmtSbtCheck; +test")
7-
addCommandAlias("ci-docs", ";github; project-docs/mdoc; headerCreateAll")
5+
publish / skip := true
6+
7+
addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test")
8+
addCommandAlias("ci-docs", "github; mdoc; headerCreateAll")
9+
addCommandAlias("ci-publish", "github; ci-release")
810

911
lazy val V = new {
1012
val cats: String = "2.1.1"
1113
val circe: String = "0.13.0"
1214
val classutil: String = "1.5.1"
13-
val http4s: String = "0.21.3"
15+
val http4s: String = "0.21.4"
1416
val scala: String = "2.13.2"
15-
val scala212: String = "2.12.11"
16-
val scalatest: String = "3.1.1"
17+
val scalatest: String = "3.1.2"
1718
}
1819

19-
lazy val root = project
20-
.in(file("."))
21-
.settings(moduleName := "scala-exercises-runtime")
22-
.settings(skip in publish := true)
23-
.aggregate(runtime, `evaluator-client`)
24-
.dependsOn(runtime, `evaluator-client`)
25-
2620
lazy val runtime = project
2721
.dependsOn(`evaluator-client`)
2822
.settings(name := "runtime")
@@ -46,10 +40,7 @@ lazy val `evaluator-client` = project
4640
)
4741
)
4842

49-
lazy val `project-docs` = (project in file(".docs"))
50-
.aggregate(runtime, `evaluator-client`)
51-
.settings(moduleName := "runtime-project-docs")
52-
.settings(mdocIn := file(".docs"))
43+
lazy val documentation = project
5344
.settings(mdocOut := file("."))
54-
.settings(skip in publish := true)
45+
.settings(publish / skip := true)
5546
.enablePlugins(MdocPlugin)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

project/build.properties

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

project/plugins.sbt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
2-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
3-
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
4-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
5-
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
6-
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
7-
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.1")
8-
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.1")
9-
addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2")
1+
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
2+
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
3+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
4+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
5+
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
6+
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.8.2")
7+
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.2")
8+
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.2")
9+
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
10+
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.12")

runtime/src/test/scala/com/fortysevendeg/exercises/ExampleTarget.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ object ExampleTarget extends AnyFlatSpec with Matchers {
3131
def throwsExceptionMethod(): Unit =
3232
throw new ExampleException
3333

34-
def takesEitherMethod(either: Either[_, _]): Boolean = true
3534
}

runtime/src/test/scala/com/fortysevendeg/exercises/LibraryDiscoverySpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LibraryDiscoverySpec extends AnyFunSpec with Matchers {
2929

3030
describe("exercise discovery") {
3131
it("should be able to load libraries") {
32-
val (errors, discovered) = Exercises.discoverLibraries()
32+
val (_, discovered) = Exercises.discoverLibraries()
3333

3434
discovered.toSet shouldEqual Set(
3535
LibraryA,
@@ -39,7 +39,7 @@ class LibraryDiscoverySpec extends AnyFunSpec with Matchers {
3939
}
4040

4141
it("libraries that are not objects should trigger errors") {
42-
val (errors, discovered) = Exercises.discoverLibraries()
42+
val (errors, _) = Exercises.discoverLibraries()
4343

4444
errors.size shouldEqual 1
4545
}

0 commit comments

Comments
 (0)