Skip to content

Commit

Permalink
Drop macros module using fluent-copy library
Browse files Browse the repository at this point in the history
  • Loading branch information
geirolz committed Dec 27, 2022
1 parent 6e94a04 commit 51771b7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 103 deletions.
20 changes: 8 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,21 @@ lazy val fly4s: Project = project
.settings(
crossScalaVersions := Nil
)
.aggregate(core, macros)
.aggregate(core)

lazy val core: Project =
buildModule(
prjModuleName = "core",
toPublish = true,
folder = "."
).dependsOn(macros)
.settings(
libraryDependencies ++= ProjectDependencies.Core.dedicated
)

lazy val macros: Project =
buildModule(
prjModuleName = "macros",
toPublish = true,
folder = "."
).settings(
libraryDependencies ++= ProjectDependencies.Macros.dedicated
libraryDependencies ++= ProjectDependencies.Core.dedicated,
libraryDependencies ++= {
CrossVersion.partialVersion(Keys.scalaVersion.value) match {
case Some((2, _)) => ProjectDependencies.Core.for2_13_Only
case _ => Nil
}
}
)

//=============================== MODULES UTILS ===============================
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala-2/fly4s/core/data/Fly4sConfig.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package fly4s.core.data

import cats.data.NonEmptyList
import com.geirolz.macros.fluentcopy.FluentCopyMacros.FluentCopy
import com.geirolz.macros.fluent.copy.FluentCopy
import fly4s.core.data.Fly4sConfigDefaults.*

import java.nio.charset.Charset

@FluentCopy
@FluentCopy(collection = true)
case class Fly4sConfig(
connectRetries: Int = defaultConnectRetries,
initSql: Option[String] = defaultInitSql,
Expand Down

This file was deleted.

7 changes: 2 additions & 5 deletions project/ProjectDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ object ProjectDependencies {
"org.typelevel" %% "cats-core" % "2.9.0",
"org.typelevel" %% "cats-effect" % "3.4.3",
"org.flywaydb" % "flyway-core" % "9.1.5",

// test
"org.scalameta" %% "munit" % "0.7.29" % Test,
"org.typelevel" %% "munit-cats-effect-3" % "1.0.7" % Test
Expand All @@ -25,11 +24,9 @@ object ProjectDependencies {
lazy val dedicated: Seq[ModuleID] = Seq(
"com.h2database" % "h2" % "2.1.214" % Test
)
}

object Macros {
lazy val dedicated: Seq[ModuleID] = Seq(
"org.scala-lang" % "scala-reflect" % "2.13.10"
lazy val for2_13_Only: Seq[ModuleID] = Seq(
"com.github.geirolz" %% "fluent-copy" % "0.0.1"
)
}
}

0 comments on commit 51771b7

Please sign in to comment.