Skip to content

Commit

Permalink
use the laserdisc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
barryoneill committed Nov 15, 2024
1 parent 0c2e0a2 commit 46c8445
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 112 deletions.
41 changes: 37 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
17 changes: 15 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
82 changes: 6 additions & 76 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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:[email protected]: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,
Expand All @@ -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)
40 changes: 15 additions & 25 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

}
14 changes: 13 additions & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 46c8445

Please sign in to comment.