Skip to content

Commit

Permalink
use laserdisc defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
barryoneill committed Nov 26, 2024
1 parent 090e1a0 commit ee96a27
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 74 deletions.
43 changes: 40 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
.idea/
# ------------------ 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/
.cache
.sbtopts
.tasty

# intellij
.idea/
*.iml

# metals / bsp
.metals/
.bloop/
.bsp/
.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
72 changes: 9 additions & 63 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,72 +1,18 @@
lazy val scala213 = "2.13.15"
lazy val scala3 = "3.3.4"
import laserdisc.sbt.CompileTarget.Scala2And3
import laserdisc.sbt.LaserDiscDevelopers.*

ThisBuild / laserdiscRepoName := "scanamo-circe"
ThisBuild / laserdiscCompileTarget := Scala2And3

lazy val root = project
.in(file("."))
.settings(
name := "scanamo-circe",
organization := "io.laserdisc",
crossScalaVersions := List(scala213, scala3),
scalaVersion := scala3,
licenses ++= Seq(("MIT", url("http://opensource.org/licenses/MIT"))),
homepage := Some(url("https://github.com/laserdisc-io/scanamo-circe")),
developers := List(
Developer("semenodm", "Dmytro Semenov", "", url("https://github.com/semenodm")),
Developer("barryoneill", "Barry O'Neill", "", url("https://github.com/barryoneill"))
),
Test / fork := true,
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
}
},
sbt.Test / testFrameworks += TestFrameworks.ScalaCheck,
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.")),
name := "scanamo-circe",
developers := List(Dmytro, Barry),
Dependencies.Compat,
Dependencies.Circe,
Dependencies.Scanamo,
Dependencies.ScalaTest,
Dependencies.scalacheck,
addCommandAlias("format", ";scalafmtAll;scalafmtSbt"),
addCommandAlias("checkFormat", ";scalafmtCheckAll;scalafmtCheck"),
addCommandAlias("build", ";checkFormat;clean;test;coverage"),
addCommandAlias("release", ";checkFormat;clean;test;coverage;release")
Dependencies.scalacheck
)
.enablePlugins(ScalafmtPlugin)
.enablePlugins(LaserDiscDefaultsPlugin)
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Dependencies {

val Compat = libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0"
val Circe = libraryDependencies += "io.circe" %% "circe-parser" % "0.14.10"
val Scanamo = libraryDependencies += "org.scanamo" %% "scanamo" % "2.0.0"
val Scanamo = libraryDependencies += "org.scanamo" %% "scanamo" % "3.0.0"
val ScalaTest = libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % "test"
val scalacheck = libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.18.1" % "test"
}
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("org.scoverage" % "sbt-scoverage" % "2.0.5")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2")
addSbtPlugin("io.laserdisc" % "sbt-laserdisc-defaults" % "0.2.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")

0 comments on commit ee96a27

Please sign in to comment.