Skip to content

Commit

Permalink
Prepare repository for next .github release and SBT build improveme…
Browse files Browse the repository at this point in the history
…nts (#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
  • Loading branch information
juanpedromoreno authored Jun 9, 2020
1 parent 2dfcf1f commit b951b8a
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 31 deletions.
27 changes: 9 additions & 18 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
ThisBuild / organization := "org.scala-exercises"
ThisBuild / githubOrganization := "47degrees"
ThisBuild / scalaVersion := V.scala
ThisBuild / crossScalaVersions := Seq(V.scala212, V.scala)

addCommandAlias("ci-test", ";scalafmtCheckAll; scalafmtSbtCheck; +test")
addCommandAlias("ci-docs", ";github; project-docs/mdoc; headerCreateAll")
publish / skip := true

addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; test")
addCommandAlias("ci-docs", "github; mdoc; headerCreateAll")
addCommandAlias("ci-publish", "github; ci-release")

lazy val V = new {
val cats: String = "2.1.1"
val circe: String = "0.13.0"
val classutil: String = "1.5.1"
val http4s: String = "0.21.3"
val http4s: String = "0.21.4"
val scala: String = "2.13.2"
val scala212: String = "2.12.11"
val scalatest: String = "3.1.1"
val scalatest: String = "3.1.2"
}

lazy val root = project
.in(file("."))
.settings(moduleName := "scala-exercises-runtime")
.settings(skip in publish := true)
.aggregate(runtime, `evaluator-client`)
.dependsOn(runtime, `evaluator-client`)

lazy val runtime = project
.dependsOn(`evaluator-client`)
.settings(name := "runtime")
Expand All @@ -46,10 +40,7 @@ lazy val `evaluator-client` = project
)
)

lazy val `project-docs` = (project in file(".docs"))
.aggregate(runtime, `evaluator-client`)
.settings(moduleName := "runtime-project-docs")
.settings(mdocIn := file(".docs"))
lazy val documentation = project
.settings(mdocOut := file("."))
.settings(skip in publish := true)
.settings(publish / skip := true)
.enablePlugins(MdocPlugin)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.10
sbt.version=1.3.12
19 changes: 10 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.12")
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ object ExampleTarget extends AnyFlatSpec with Matchers {
def throwsExceptionMethod(): Unit =
throw new ExampleException

def takesEitherMethod(either: Either[_, _]): Boolean = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LibraryDiscoverySpec extends AnyFunSpec with Matchers {

describe("exercise discovery") {
it("should be able to load libraries") {
val (errors, discovered) = Exercises.discoverLibraries()
val (_, discovered) = Exercises.discoverLibraries()

discovered.toSet shouldEqual Set(
LibraryA,
Expand All @@ -39,7 +39,7 @@ class LibraryDiscoverySpec extends AnyFunSpec with Matchers {
}

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

errors.size shouldEqual 1
}
Expand Down

0 comments on commit b951b8a

Please sign in to comment.