Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
scala: [2.12.15, 2.11.12, 2.13.8, 3.0.2]
scala: [2.12.21, 2.13.18, 3.3.7]
java: [temurin@8, temurin@11, temurin@17]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -43,7 +43,7 @@ jobs:
- name: Setup Java (temurin@8)
id: setup-java-temurin-8
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 8
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 11
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,10 @@ facilitating the testing of logging-related code.

### Requirements

Scala 2.11, 2.12 and 2.13 are fully supported. No special settings or
Scala 2.12, 2.13 and 3 are fully supported. No special settings or
compiler options are required: just add the dependency as described
above.

#### Scala 2.10

Scala 2.10 support is still present, but it is beyond its support window: it
may be removed in any future minor release if there's a reason. (It will not
be removed in a patch release.)

The macro paradise compiler extensions are not required for Scala 2.10.

### Getting a logger

Most of the time, you simply want to define a logger with a name that matches
Expand Down
32 changes: 9 additions & 23 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Dependencies._
import ReleaseTransformations._

import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
import org.typelevel.sbt.TypelevelScalaJSGitHubPlugin

/* TODO: Attempts to do this with the existing `TaskKey` have failed, but that
* would be better than doing it using the string. This approach also won't
Expand Down Expand Up @@ -59,7 +60,7 @@ def jsOpts = new Def.SettingList(Seq(
))

lazy val root: Project = (project in file ("."))
.enablePlugins(BasicSettings)
.enablePlugins(BasicSettings, TypelevelScalaJSGitHubPlugin)
.settings(Publish.settings: _*)
.settings(Release.settings: _*)
.aggregate(coreJVM, coreJS, testingJVM, testingJS)
Expand Down Expand Up @@ -118,7 +119,7 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform) in file ("core"))
libraryDependencies ++= Seq (
slf4j,
logback % "test",
"org.scalacheck" %%% "scalacheck" % scalacheckVersion.value % "test",
"org.scalacheck" %%% "scalacheck" % scalacheckVersion % "test",
),
libraryDependencies ++= {
if (isScala3(scalaVersion.value)) Seq.empty
Expand All @@ -127,16 +128,7 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform) in file ("core"))

Compile / unmanagedSourceDirectories ++= {
scalaBinaryVersion.value match {
case s if s.startsWith("2.") =>
Seq(baseDirectory.value / ".." / "shared" / "src" / "main" / "scala-2")
case s if s.startsWith("3") =>
Seq.empty
}
},

Compile / unmanagedSourceDirectories ++= {
scalaBinaryVersion.value match {
case "2.11" | "2.12" =>
case "2.12" =>
Seq(baseDirectory.value / ".." / "shared" / "src" / "main" / "scala-oldcoll")
case _ =>
Seq(baseDirectory.value / ".." / "shared" / "src" / "main" / "scala-newcoll")
Expand All @@ -147,17 +139,12 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform) in file ("core"))
.jvmSettings(
libraryDependencies += ("org.scala-js" %% "scalajs-stubs" % scalajsStubsVersion % "provided").cross(CrossVersion.for3Use2_13),
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % scalatestVersion.value % Test,
"org.scalatestplus" %%% "scalacheck-1-15" % scalatestPlusScalacheckVersion.value % Test
"org.scalatest" %%% "scalatest" % scalatestVersion % Test,
"org.scalatestplus" %%% "scalacheck-1-15" % scalatestPlusScalacheckVersion % Test
),
prevVersions := {
/* I'm using the first & last version of each minor release rather than
* including every single patch-level update. */
def `2.11Versions` =
Set("1.0.3", "1.0.5",
"1.1.0", "1.1.5",
"1.2.0", "1.2.1",
"1.3.0")
def `2.12Versions` =
Set("1.3.3", "1.3.6",
"1.4.0",
Expand All @@ -171,7 +158,6 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform) in file ("core"))
def DottyVersions =
Set.empty[String]
scalaBinaryVersion.value match {
case "2.11" => `2.11Versions` ++ `2.12Versions` ++ `2.13Versions` ++ DottyVersions
case "2.12" => `2.12Versions` ++ `2.13Versions` ++ DottyVersions
case "2.13" => `2.13Versions` ++ DottyVersions
case "3" => DottyVersions
Expand All @@ -186,8 +172,8 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform) in file ("core"))
prevVersions := jsPrevVersions,
libraryDependencies ++= {
Seq(
"org.scalatest" %%% "scalatest" % scalatestVersion.value % Test,
"org.scalatestplus" %%% "scalacheck-1-15" % scalatestPlusScalacheckVersion.value % Test,
"org.scalatest" %%% "scalatest" % scalatestVersion % Test,
"org.scalatestplus" %%% "scalacheck-1-15" % scalatestPlusScalacheckVersion % Test,
)
}
)
Expand All @@ -214,7 +200,7 @@ lazy val testing = (crossProject(JSPlatform, JVMPlatform) in file ("testing"))
val `2.13Versions` = Set("1.8.2")
val DottyVersions = Set.empty[String]
scalaBinaryVersion.value match {
case "2.11" | "2.12" => `2.12Versions` ++ `2.13Versions` ++ DottyVersions
case "2.12" => `2.12Versions` ++ `2.13Versions` ++ DottyVersions
case "2.13" => `2.13Versions` ++ DottyVersions
case "3" => DottyVersions
case other =>
Expand Down
18 changes: 3 additions & 15 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,9 @@ import Keys._
object Dependencies {
final val slf4jVersion = "1.7.36"
final val logbackVersion = "1.2.3"
final val scalacheckVersion =
Def.map(scalaBinaryVersion) {
case "2.11" => "1.15.2"
case _ => "1.15.3"
}
final val scalatestVersion =
Def.map(scalaBinaryVersion) {
case "2.11" => "3.2.3"
case _ => "3.2.9"
}
final val scalatestPlusScalacheckVersion =
Def.map(scalaBinaryVersion) {
case "2.11" => "3.2.3.0"
case _ => "3.2.9.0"
}
final val scalacheckVersion = "1.15.3"
final val scalatestVersion = "3.2.19"
final val scalatestPlusScalacheckVersion = "3.2.9.0"
final val scalajsStubsVersion = "1.0.0"

val slf4j = "org.slf4j" % "slf4j-api" % slf4jVersion
Expand Down
8 changes: 4 additions & 4 deletions project/ProjectSettings.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import sbt._
import sbt.*

/** Basic metadata about the project that gets pulled into the build */
trait ProjectSettings
Expand All @@ -15,9 +15,9 @@ trait ProjectSettings
override final val githubOrganization = "Log4s"
override final val githubProject = "log4s"

override final val buildScalaVersion = "2.12.15"
override final val extraScalaVersions = Seq("2.11.12", "2.13.8", "3.0.2")
override final val minimumJavaVersion = "1.7"
override final val buildScalaVersion = "2.12.21"
override final val extraScalaVersions = Seq("2.13.18", "3.3.7")
override final val minimumJavaVersion = "1.8"
override final val defaultOptimize = true
override final val defaultOptimizeGlobal = true
override final val defaultDisableAssertions = true
Expand Down
3 changes: 2 additions & 1 deletion project/plugin-github-actions.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.8.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.8.5")
addSbtPlugin("org.typelevel" % "sbt-typelevel-github" % "0.8.5")
4 changes: 2 additions & 2 deletions project/plugin-scalajs.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")