Skip to content

Commit

Permalink
fix: include logging3 into tofu aggregted modules
Browse files Browse the repository at this point in the history
fixes artifacts publishing
  • Loading branch information
Vadim Chelyshov committed Aug 7, 2024
1 parent 47de400 commit 725c0e3
Showing 1 changed file with 37 additions and 15 deletions.
52 changes: 37 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -259,23 +259,45 @@ lazy val logging = projectMatrix
)
.dependsOn(loggingStr, loggingDer, loggingLayout, loggingShapeless, loggingRefined, loggingLog4Cats)
.jvmPlatform(scala2Versions)
.customRow(
autoScalaLibrary = true,
axisValues = Seq(VirtualAxis.jvm, VirtualAxis.ScalaVersionAxis(Version.scala3, "3")),
process = (pr: Project) => {
def scala3ProjectRef(pm: ProjectMatrix): ProjectReference = {
val projects = pm.filterProjects(Seq(VirtualAxis.jvm, VirtualAxis.ScalaVersionAxis(Version.scala3, "3")))
projects.headOption match {
case Some(p) => p
case None => throw new Exception(s"Can't found scala3 axis for ${pm}")
}
}

lazy val logging3 = projectMatrix
.in(modules / "logging")
.aggregate(
loggingStr,
loggingDer,
loggingLayout,
loggingRefined,
loggingLog4Cats,
loggingLogstashLogback,
)
.settings(
defaultSettings,
name := "tofu-logging"
val aggModules = Seq(
loggingStr,
loggingDer,
loggingLayout,
loggingRefined,
loggingLog4Cats,
loggingLogstashLogback,
).map(scala3ProjectRef(_))

val dependsOnModules: Seq[ClasspathDep[ProjectReference]] = Seq(
loggingStr,
loggingDer,
loggingLayout,
loggingRefined,
loggingLog4Cats
).map(scala3ProjectRef(_))
.map(ClasspathDependency(_, None))

pr.aggregate(aggModules: _*)
.settings(
defaultSettings,
scalaVersion := Version.scala3,
name := "tofu-logging"
)
.dependsOn(dependsOnModules: _*)
}
)
.dependsOn(loggingStr, loggingDer, loggingLayout, loggingRefined, loggingLog4Cats)
.jvmPlatform(List(Version.scala3))

val util = modules / "util"

Expand Down

0 comments on commit 725c0e3

Please sign in to comment.