Skip to content

Commit

Permalink
Merge pull request #41 from geirolz/Add_testing_module
Browse files Browse the repository at this point in the history
Add testing module
  • Loading branch information
geirolz authored Jun 8, 2023
2 parents 5db0313 + d0fe92f commit aa64385
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lazy val root: Project = project
.settings(
copyReadMe := IO.copyFile(file("docs/compiled/README.md"), file("README.md"))
)
.aggregate(core, docs, config, log4cats, odin, `config-pureconfig`)
.aggregate(core, docs, config, testing, log4cats, odin, `config-pureconfig`)

lazy val docs: Project =
project
Expand Down Expand Up @@ -71,7 +71,7 @@ lazy val core: Project =
folder = "."
).settings(
libraryDependencies ++= ProjectDependencies.Core.dedicated
)
).dependsOn(testing)

lazy val config: Project =
buildModule(
Expand All @@ -82,6 +82,15 @@ lazy val config: Project =
libraryDependencies ++= ProjectDependencies.Config.dedicated
)

lazy val testing: Project =
buildModule(
prjModuleName = "testing",
toPublish = true,
folder = "."
).settings(
libraryDependencies ++= ProjectDependencies.Testing.dedicated
)

lazy val example: Project = {
val appPackage: String = "com.geirolz.example.app"
buildModule(
Expand Down Expand Up @@ -148,6 +157,7 @@ lazy val `config-pureconfig`: Project =
.settings(
libraryDependencies ++= ProjectDependencies.Integrations.ConfigPureConfig.dedicated
)

//=============================== MODULES UTILS ===============================
def buildModule(prjModuleName: String, toPublish: Boolean, folder: String): Project = {
val keys = prjModuleName.split("-")
Expand Down
8 changes: 8 additions & 0 deletions project/ProjectDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ object ProjectDependencies {
lazy val dedicated: Seq[ModuleID] = Nil
}

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

object Examples {

private lazy val dedicatedCommon: Seq[ModuleID] = Seq(
Expand Down Expand Up @@ -95,6 +102,7 @@ object ProjectDependencies {
)
}
}

object Plugins {
val compilerPluginsFor2_13: Seq[ModuleID] = Seq(
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
Expand Down

0 comments on commit aa64385

Please sign in to comment.