diff --git a/.gitignore b/.gitignore index 143feda..373499d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,42 @@ -.terraform/ +# ------------------ autogenerated file - do not edit ------------------- +# This file was generated by sbt-laserdisc-defaults +# +# Please check in any changes generated in this file (for IDE support) +# +# To make changes, please publish a new version of the plugin at: +# https://github.com/laserdisc-io/sbt-laserdisc-defaults +# +# To temporarily disable generation, set this at the top of build.sbt: +# ThisBuild / laserdiscGitIgnoreGenOn := false +# ----------------------------------------------------------------------- + +# tip: use a "global" gitignore (core.excludesfile) for your own, local, personal preferences +# See: https://gist.github.com/subfuzion/db7f57fff2fb6998a16c + +# scala / sbt / java +project/project/ +project/target/ target/ +.sbtopts +.tasty + +# intellij .idea/ -.idea/* *.iml + +# metals / bsp +.metals/ .bloop/ .bsp/ -.jvmopts -.DS_Store +project/metals.sbt + +# vscode +.vscode/ + +# terraform +.terraform/ +*.tfplan +*.terraform.lock.hcl + +# mac +.DS_Store \ No newline at end of file diff --git a/.scalafmt.conf b/.scalafmt.conf index 8d8e3c6..34ae598 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,12 +1,25 @@ +# ------------------ autogenerated file - do not edit ------------------- +# This file was generated by sbt-laserdisc-defaults +# +# Please check in any changes generated in this file (for IDE support) +# +# To make changes, please publish a new version of the plugin at: +# https://github.com/laserdisc-io/sbt-laserdisc-defaults +# +# To temporarily disable generation, set this at the top of build.sbt: +# ThisBuild / laserdiscScalaFmtGenOn := false +# ----------------------------------------------------------------------- + version=3.8.3 maxColumn = 140 style = default align.preset = more -runner.dialect = scala213source3 +project.layout = StandardConvention +runner.dialect = scala3 fileOverride { - "glob:**/scala-3/**" { runner.dialect = scala3 } + "lang:scala-2" = scala213source3 } danglingParentheses.preset = true diff --git a/build.sbt b/build.sbt index 4a133db..c478b18 100644 --- a/build.sbt +++ b/build.sbt @@ -1,79 +1,12 @@ -lazy val scala213 = "2.13.15" -lazy val scala3 = "3.3.4" -lazy val supportedScalaVersions = List(scala213, scala3) -ThisBuild / crossScalaVersions := supportedScalaVersions -ThisBuild / scalaVersion := scala213 +import laserdisc.sbt.LaserDiscDevelopers.Barry -lazy val publishSettings = Seq( - Test / publishArtifact := false, - pomIncludeRepository := (_ => false), - organization := "io.laserdisc", - homepage := Some(url("http://laserdisc.io/slack4s")), - developers := List( - Developer("barryoneill", "Barry O'Neill", "", url("https://github.com/barryoneill")) - ), - scmInfo := Some( - ScmInfo( - url("https://github.com/laserdisc-io/slack4s/tree/master"), - "scm:git:git@github.com:laserdisc-io/slack4s.git" - ) - ), - licenses := Seq( - "MIT" -> url("https://raw.githubusercontent.com/laserdisc-io/slack4s/master/LICENSE") - ) -) +ThisBuild / laserdiscRepoName := "slack4s" lazy val root = project .in(file(".")) .settings( - name := "slack4s", - publishSettings, - Seq( - libraryDependencies ++= Seq( - compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.3").cross(CrossVersion.full)), - compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") - ).filterNot(_ => scalaVersion.value.startsWith("3.")), - scalacOptions ++= Seq( - "-deprecation", - "-encoding", - "UTF-8", - "-feature", - "-language:existentials,experimental.macros,higherKinds,implicitConversions,postfixOps", - "-unchecked", - "-Xfatal-warnings" - ), - scalacOptions ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, minor)) if minor >= 13 => - Seq( - "-Xlint:-unused,_", - "-Ywarn-numeric-widen", - "-Ywarn-value-discard", - "-Ywarn-unused:implicits", - "-Ywarn-unused:imports", - "-Xsource:3", - "-Xlint:-byname-implicit", - "-P:kind-projector:underscore-placeholders", - "-Xlint", - "-Ywarn-macros:after" - ) - case _ => Seq.empty - } - }, - scalacOptions ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((3, _)) => - Seq( - "-Ykind-projector:underscores", - "-source:future", - "-language:adhocExtensions", - "-Wconf:msg=`= _` has been deprecated; use `= uninitialized` instead.:s" - ) - case _ => Seq.empty - } - } - ), - Test / fork := true, + name := "slack4s", + developers := List(Barry), // ------------------------- deps ------------------------- excludeDependencies += "commons-logging", Dependencies.TestLib, @@ -85,9 +18,6 @@ lazy val root = project Dependencies.Slack, // ------------------ version fmt + buildinfo ------------------ buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion), - buildInfoPackage := "slack4s", - addCommandAlias("format", ";scalafmtAll;scalafmtSbt"), - addCommandAlias("checkFormat", ";scalafmtCheckAll;scalafmtSbtCheck"), - addCommandAlias("fullTest", ";clean;checkFormat;test") + buildInfoPackage := "slack4s" ) - .enablePlugins(BuildInfoPlugin, GitVersioning) + .enablePlugins(BuildInfoPlugin, LaserDiscDefaultsPlugin) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index c0cb060..b61e38b 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,48 +8,38 @@ object Dependencies { testFrameworks += new TestFramework("munit.Framework"), libraryDependencies ++= Seq( "org.scalameta" %% "munit" % "1.0.2", - "org.mockito" % "mockito-core" % "5.14.1", + "org.mockito" % "mockito-core" % "5.14.2", "org.gnieh" %% "diffson-circe" % "4.6.0" ).map(_ % Test) ) - val Slack = Seq( - libraryDependencies += "com.slack.api" % "slack-app-backend" % "1.43.1" - ) + val Slack = libraryDependencies += "com.slack.api" % "slack-app-backend" % "1.44.1" - val Refined = Seq( - libraryDependencies += "eu.timepit" %% "refined" % "0.11.2" - ) + val Refined = libraryDependencies += "eu.timepit" %% "refined" % "0.11.2" - val NewTypes = Seq( - libraryDependencies += "io.monix" %% "newtypes-core" % "0.3.0" - ) + val NewTypes = libraryDependencies += "io.monix" %% "newtypes-core" % "0.3.0" val Logging = Seq( libraryDependencies ++= Seq( "org.typelevel" %% "log4cats-slf4j" % "2.7.0", - "ch.qos.logback" % "logback-classic" % "1.5.9" % Test, - "ch.qos.logback" % "logback-core" % "1.5.9" % Test, + "ch.qos.logback" % "logback-classic" % "1.5.12" % Test, + "ch.qos.logback" % "logback-core" % "1.5.12" % Test, "org.slf4j" % "jcl-over-slf4j" % "2.0.16" % Test, "org.slf4j" % "jul-to-slf4j" % "2.0.16" % Test ) ) - val Http4s = Seq( - libraryDependencies ++= Seq( - "org.http4s" %% "http4s-dsl", - "org.http4s" %% "http4s-ember-server", - "org.http4s" %% "http4s-ember-client", - "org.http4s" %% "http4s-circe" - ).map(_ % "0.23.28") - ) + val Http4s = libraryDependencies ++= Seq( + "http4s-dsl", + "http4s-ember-server", + "http4s-ember-client", + "http4s-circe" + ).map("org.http4s" %% _ % "0.23.29") val CirceVersion = "0.14.10" - val Circe = Seq( - libraryDependencies ++= Seq( - "io.circe" %% "circe-core" % CirceVersion, - "io.circe" %% "circe-parser" % CirceVersion - ) + val Circe = libraryDependencies ++= Seq( + "io.circe" %% "circe-core" % CirceVersion, + "io.circe" %% "circe-parser" % CirceVersion ) } diff --git a/project/build.properties b/project/build.properties index 0b699c3..8bfed43 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1,13 @@ -sbt.version=1.10.2 +# ------------------ autogenerated file - do not edit ------------------- +# This file was generated by sbt-laserdisc-defaults +# +# Please check in any changes generated in this file (for IDE support) +# +# To make changes, please publish a new version of the plugin at: +# https://github.com/laserdisc-io/sbt-laserdisc-defaults +# +# To temporarily disable generation, set this at the top of build.sbt: +# ThisBuild / laserdiscSBTVersionGenOn := false +# ----------------------------------------------------------------------- + +sbt.version = 1.10.5 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index bf81168..eeb48d6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.7.0") +addSbtPlugin("io.laserdisc" % "sbt-laserdisc-defaults" % "0.1.1") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")