Skip to content

Commit

Permalink
Drop Scala 3.3.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
geirolz committed Sep 13, 2024
1 parent 91e9ada commit 469edb8
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 153 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ jobs:
matrix:
# supported scala versions
include:
- scala: 3.3.3
name: Scala3_3
test-tasks: scalafmtCheck gen-doc coverage test coverageReport
- scala: 3.4.2
name: Scala3_4
- scala: 3.5.0
name: Scala3_5
test-tasks: scalafmtCheck gen-doc coverage test coverageReport

steps:
Expand Down Expand Up @@ -72,18 +69,18 @@ jobs:
needs: [ build ]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

#----------- JDK -----------
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "liberica"
java-version: 17

#----------- CACHE -----------
- name: Cache SBT
uses: actions/cache@v3.2.3
uses: actions/cache@v4
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
Expand Down
6 changes: 3 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pull_request_rules:
- "#approved-reviews-by>=1"
- check-success=codecov/patch
- check-success=codecov/project
- check-success=build (Scala3_4)
- check-success=build (Scala3_5)
- base=main
- label!=work-in-progress
actions:
Expand All @@ -13,15 +13,15 @@ pull_request_rules:
- name: automatic merge for master when CI passes and author is steward
conditions:
- author=scala-steward-geirolz[bot]
- check-success=build (Scala3_4)
- check-success=build (Scala3_5)
- base=main
actions:
merge:
method: rebase
- name: automatic merge for master when CI passes and author is dependabot
conditions:
- author=dependabot[bot]
- check-success=build (Scala3_4)
- check-success=build (Scala3_5)
- base=main
actions:
merge:
Expand Down
13 changes: 6 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import sbt.project
lazy val prjName = "toolkit"
lazy val prjDescription = "A small toolkit to build functional app with managed resources"
lazy val org = "com.github.geirolz"
lazy val scala33 = "3.3.3"
lazy val scala34 = "3.5.0"
lazy val supportedScalaVersions = List(scala33, scala34)
lazy val scala35 = "3.5.0"
lazy val supportedScalaVersions = List(scala35)

//## global project to no publish ##
val copyReadMe = taskKey[Unit]("Copy generated README to main folder.")
Expand Down Expand Up @@ -45,7 +44,7 @@ lazy val docs: Project =
.settings(
baseSettings,
noPublishSettings,
libraryDependencies ++= ProjectDependencies.Docs.dedicated,
libraryDependencies ++= PrjDependencies.Docs.dedicated,
// config
scalacOptions --= Seq("-Werror", "-Xfatal-warnings"),
mdocIn := file("docs/source"),
Expand Down Expand Up @@ -193,10 +192,10 @@ lazy val baseSettings: Seq[Def.Setting[_]] = Seq(
scalacOptions ++= scalacSettings(scalaVersion.value),
versionScheme := Some("early-semver"),
// dependencies
resolvers ++= ProjectResolvers.all,
resolvers ++= PrjResolvers.all,
libraryDependencies ++= Seq(
ProjectDependencies.common,
ProjectDependencies.Plugins.compilerPlugins
PrjDependencies.common,
PrjDependencies.Plugins.compilerPlugins
).flatten
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.geirolz.app.toolkit.fly4s

import cats.effect.IO
import com.geirolz.app.toolkit.fly4s.testing.TestConfig
import com.geirolz.app.toolkit.{App, AppMessages, SimpleAppInfo, ctx}
import com.geirolz.app.toolkit.{ctx, App, AppMessages, SimpleAppInfo}

import java.time.LocalDateTime

Expand All @@ -11,13 +11,11 @@ class Fly4sSupportSuite extends munit.CatsEffectSuite:
test("Syntax works as expected") {
App[IO]
.withInfo(
SimpleAppInfo.string(
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
.withConfigPure(
TestConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ class Log4CatsLoggerAdapterSuite extends munit.CatsEffectSuite {
assertIO_(
App[IO]
.withInfo(
SimpleAppInfo.string(
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
.withLoggerPure(_ => NoOpLogger[IO])
.withoutDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ class OdinLoggerAdapterSuite extends munit.CatsEffectSuite {
assertIO_(
App[IO]
.withInfo(
SimpleAppInfo.string(
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
name = "toolkit",
version = "0.0.1",
scalaVersion = "2.13.10",
sbtVersion = "1.8.0",
builtOn = LocalDateTime.now()
)
.withLoggerPure(_ => OdinLogger.noop[IO])
.withoutDependencies
Expand Down
115 changes: 115 additions & 0 deletions project/PrjDependencies.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import sbt.*

import scala.language.postfixOps

object PrjDependencies {

object Versions {
type Version = String
val cats: Version = "2.12.0"
val catsEffect: Version = "3.5.4"
val circe: Version = "0.14.9"
val circeGenericExtra: Version = "0.14.3"
val pureConfig: Version = "0.17.7"
val fly4s: Version = "1.0.8"
val munit: Version = "1.0.0"
val munitEffect: Version = "2.0.0"
val slf4: Version = "2.0.16"
val log4cats: Version = "2.7.0"
val odin: Version = "0.14.0"
val http4s: Version = "0.23.27"
val fs2: Version = "3.11.0"
val scalacheck: Version = "1.18.0"
}

lazy val common: Seq[ModuleID] = Seq(
// runtime
"org.typelevel" %% "cats-core" % Versions.cats,

// test
"org.scalameta" %% "munit" % Versions.munit % Test,
"org.scalameta" %% "munit-scalacheck" % Versions.munit % Test,
"org.typelevel" %% "munit-cats-effect" % Versions.munitEffect % Test,
"org.scalacheck" %% "scalacheck" % Versions.scalacheck % Test
)

object Core {
lazy val dedicated: Seq[ModuleID] = Seq(
// runtime
"org.typelevel" %% "cats-effect" % Versions.catsEffect
)
}

object Config {
lazy val dedicated: Seq[ModuleID] = Nil
}

object Testing {
lazy val dedicated: Seq[ModuleID] = Seq(
// runtime
"org.typelevel" %% "cats-effect" % Versions.catsEffect
)
}

object Examples {

lazy val dedicated: Seq[ModuleID] = Seq(
// http
"org.http4s" %% "http4s-dsl" % Versions.http4s,
"org.http4s" %% "http4s-ember-server" % Versions.http4s,

// streaming
"co.fs2" %% "fs2-core" % Versions.fs2,

// logging
"org.typelevel" %% "log4cats-slf4j" % Versions.log4cats,
"org.slf4j" % "slf4j-api" % Versions.slf4,
"org.slf4j" % "slf4j-simple" % Versions.slf4,

// config
"com.github.pureconfig" %% "pureconfig-http4s" % Versions.pureConfig,
"com.github.pureconfig" %% "pureconfig-ip4s" % Versions.pureConfig,

// json
"io.circe" %% "circe-core" % Versions.circe,
"io.circe" %% "circe-refined" % Versions.circe,
"io.circe" %% "circe-generic" % Versions.circe
)
}

object Integrations {

object Log4cats {
lazy val dedicated: Seq[ModuleID] = List(
"org.typelevel" %% "log4cats-core" % Versions.log4cats,
"org.typelevel" %% "log4cats-noop" % Versions.log4cats % Test
)
}

object Odin {
lazy val dedicated: Seq[ModuleID] = List(
"dev.scalafreaks" %% "odin-core" % Versions.odin
)
}

object Pureconfig {
lazy val dedicated: Seq[ModuleID] = List(
"com.github.pureconfig" %% "pureconfig-core" % Versions.pureConfig
)
}

object Fly4s {
lazy val dedicated: Seq[ModuleID] = List(
"com.github.geirolz" %% "fly4s" % Versions.fly4s
)
}
}

object Plugins {
val compilerPlugins: Seq[ModuleID] = Nil
}

object Docs {
lazy val dedicated: Seq[ModuleID] = Examples.dedicated
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sbt.{Resolver, _}
import sbt.librarymanagement.MavenRepository

object ProjectResolvers {
object PrjResolvers {

lazy val all: Seq[MavenRepository] = Seq(
Resolver.sonatypeOssRepos("public"),
Expand Down
Loading

0 comments on commit 469edb8

Please sign in to comment.