diff --git a/build.sbt b/build.sbt index a533b1e..425f5a4 100644 --- a/build.sbt +++ b/build.sbt @@ -8,11 +8,15 @@ ThisBuild / scalaVersion := scala3Version +// TODO: get rid of the nested empty directories in packages +// MAYBE: get rid of src/main/scala, replace with less nested structure +// We mostly know what kind of project it is, there is no need to have this by default lazy val proof = entityProject("proof", file("domain/proof")) .components(_.dependsOn(ui)) .model(_.dependsOn(core)) .json(_.dependsOn(json)) .repo(_.dependsOn(`mongo-support`)) + .entity(_.dependsOn(`akka-persistence-support`)) .endpoints(_.dependsOn(`tapir-support`)) lazy val parameters = entityProject("parameters", file("domain/parameters")) @@ -42,6 +46,7 @@ .in(file("endpoints")) .dependsOn(core, json, `tapir-support`) +// TODO: move all from fiftyforms to iterative works lazy val ui = (project in file("fiftyforms/ui")) .enablePlugins(ScalaJSPlugin) .settings( @@ -72,6 +77,10 @@ .cross(CrossVersion.for3Use2_13) ) +lazy val `akka-persistence-support` = project + .in(file("fiftyforms/akka-persistence")) + .settings(IWDeps.akkaPersistence) + lazy val app = (project in file("app")) .enablePlugins(ScalaJSPlugin, VitePlugin) .settings( diff --git a/build.sbt b/build.sbt index a533b1e..425f5a4 100644 --- a/build.sbt +++ b/build.sbt @@ -8,11 +8,15 @@ ThisBuild / scalaVersion := scala3Version +// TODO: get rid of the nested empty directories in packages +// MAYBE: get rid of src/main/scala, replace with less nested structure +// We mostly know what kind of project it is, there is no need to have this by default lazy val proof = entityProject("proof", file("domain/proof")) .components(_.dependsOn(ui)) .model(_.dependsOn(core)) .json(_.dependsOn(json)) .repo(_.dependsOn(`mongo-support`)) + .entity(_.dependsOn(`akka-persistence-support`)) .endpoints(_.dependsOn(`tapir-support`)) lazy val parameters = entityProject("parameters", file("domain/parameters")) @@ -42,6 +46,7 @@ .in(file("endpoints")) .dependsOn(core, json, `tapir-support`) +// TODO: move all from fiftyforms to iterative works lazy val ui = (project in file("fiftyforms/ui")) .enablePlugins(ScalaJSPlugin) .settings( @@ -72,6 +77,10 @@ .cross(CrossVersion.for3Use2_13) ) +lazy val `akka-persistence-support` = project + .in(file("fiftyforms/akka-persistence")) + .settings(IWDeps.akkaPersistence) + lazy val app = (project in file("app")) .enablePlugins(ScalaJSPlugin, VitePlugin) .settings( diff --git a/project/DomainProjectsPlugin.scala b/project/DomainProjectsPlugin.scala index 6aad728..80ee492 100644 --- a/project/DomainProjectsPlugin.scala +++ b/project/DomainProjectsPlugin.scala @@ -38,6 +38,8 @@ def components(upd: Project => Project): EntityProject = query(_.components(upd)).command(_.components(upd)) def repo(upd: Project => Project): EntityProject = query(_.repo(upd)) + def projection(upd: Project => Project): EntityProject = query(_.projection(upd)) + def entity(upd: Project => Project): EntityProject = command(_.entity(upd)) override def componentProjects: Seq[Project] = Seq(model, json).flatMap( _.componentProjects