Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mercury): Fix project mercury-mediator ATL-2030 #84

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mercury/mercury-library/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ lazy val protocolLogin = project

lazy val protocolReportProblem = project
.in(file("protocol-report-problem"))
.settings(name := "protocol-report-problem")
.settings(name := "mercury-protocol-report-problem")
.dependsOn(models)

lazy val protocolRouting = project
Expand Down
7 changes: 5 additions & 2 deletions mercury/mercury-mediator/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
version = "3.5.3"
runner.dialect = scala3
version = 3.5.8
runner.dialect = scala3

maxColumn = 120
trailingCommas = preserve
97 changes: 23 additions & 74 deletions mercury/mercury-mediator/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ inThisBuild(
val apiBaseDirectory =
settingKey[File]("The base directory for Castor API specifications")
ThisBuild / apiBaseDirectory := baseDirectory.value / ".." / "api"
ThisBuild / resolvers += Resolver.githubPackages(
"input-output-hk",
"atala-prism-building-blocks"
)
ThisBuild / resolvers += Resolver.githubPackages("input-output-hk", "atala-prism-building-blocks")

lazy val V = new {
val munit = "1.0.0-M6" // "0.7.29"
Expand All @@ -33,35 +30,24 @@ lazy val V = new {
// https://mvnrepository.com/artifact/io.circe/circe-core
val circe = "0.14.2"

val tapir = "1.0.3"

val mercury = "0.2.0"
}

/** Dependencies */
lazy val D = new {

val mercuryModels =
Def.setting("io.iohk.atala" %% "mercury-data-models" % V.mercury)
// val mercury10 = Def.setting("io.iohk.atala" %% "mercury-agent-didscala" % V.mercury)
// val mercury11 = Def.setting("io.iohk.atala" %% "mercury-agent-core" % V.mercury)
val mercuryAgent =
Def.setting("io.iohk.atala" %% "mercury-agent-didcommx" % V.mercury)
// val mercury2 = Def.setting("io.iohk.atala" %% "protocol-outofband-login" % V.mercury) //FIXME
val mercury4 = Def.setting("io.iohk.atala" %% "mercury-resolver" % V.mercury)
val mercury3 =
Def.setting("io.iohk.atala" %% "mercury-protocol-routing-2_0" % V.mercury)
val mercury5 = Def.setting(
"io.iohk.atala" %% "mercury-protocol-coordinate-mediation" % V.mercury
)
val mercury6 =
Def.setting("io.iohk.atala" %% "mercury-protocol-invitation" % V.mercury)
val mercury7 =
Def.setting("io.iohk.atala" %% "mercury-protocol-did-exchange" % V.mercury)
val mercury8 =
Def.setting("io.iohk.atala" %% "mercury-protocol-mailbox" % V.mercury)
val mercury9 =
Def.setting("io.iohk.atala" %% "mercury-protocol-connection" % V.mercury)
val mercuryModels = Def.setting("io.iohk.atala" %% "mercury-data-models" % V.mercury)
val mercuryAgent = Def.setting("io.iohk.atala" %% "mercury-agent-didcommx" % V.mercury)
val mercuryResolver = Def.setting("io.iohk.atala" %% "mercury-resolver" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-agent-didscala" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-agent-core" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-outofband-login" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-routing-2_0" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-coordinate-mediation" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-invitation" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-did-exchange" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-mailbox" % V.mercury)
// Def.setting("io.iohk.atala" %% "mercury-protocol-connection" % V.mercury)

val zio = Def.setting("dev.zio" %% "zio" % V.zio)
val zioStreams = Def.setting("dev.zio" %% "zio-streams" % V.zio)
Expand All @@ -70,9 +56,7 @@ lazy val D = new {
val zioJson = Def.setting("dev.zio" %% "zio-json" % V.zioJson)

// val zioHttp = Def.setting("dev.zio" %% "zio-http" % V.zioHttp) // FIXME USE THIS ONE
val zioHttp = Def.setting(
"io.d11" %% "zhttp" % V.zioHttp
) // REMOVE (this is the old name)
val zioHttp = Def.setting("io.d11" %% "zhttp" % V.zioHttp) // REMOVE (this is the old name)

val circeCore = Def.setting("io.circe" %% "circe-core" % V.circe)
val circeGeneric = Def.setting("io.circe" %% "circe-generic" % V.circe)
Expand All @@ -81,8 +65,7 @@ lazy val D = new {
// For munit https://scalameta.org/munit/docs/getting-started.html#scalajs-setup
val munit = Def.setting("org.scalameta" %% "munit" % V.munit % Test)
// For munit zio https://github.com/poslegm/munit-zio
val munitZio =
Def.setting("com.github.poslegm" %% "munit-zio" % V.munitZio % Test)
val munitZio = Def.setting("com.github.poslegm" %% "munit-zio" % V.munitZio % Test)

}

Expand All @@ -97,47 +80,13 @@ lazy val mediator = project
.settings(libraryDependencies += D.zio.value)
.settings(libraryDependencies += D.munitZio.value)
.settings(
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-blaze-server" % "0.23.12",
"ch.qos.logback" % "logback-classic" % "1.2.11",
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server-zio" % V.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % V.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % V.tapir,
// "com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % V.tapir % Test,
// "com.softwaremill.sttp.client3" %% "circe" % "3.7.1" % Test,
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % V.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-openapi-circe-yaml" % "1.0.0-M9",
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui" % V.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-http4s" % "0.19.0-M4",
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.0.3", // This helps with Arrow Functions. But swagger is just a pain!
"com.softwaremill.sttp.tapir" %% "tapir-redoc-http4s" % "0.19.0-M4",
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.2.1",
D.mercuryModels.value,
D.mercuryAgent.value,
D.mercury3.value,
D.mercury4.value,
D.mercury5.value,
D.mercury6.value,
D.mercury7.value,
D.mercury8.value,
D.mercury9.value
),
libraryDependencies ++= Seq(D.mercuryModels.value, D.mercuryAgent.value),
Compile / unmanagedResourceDirectories += apiBaseDirectory.value,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
// Docker / maintainer := "[email protected]",
// Docker / dockerRepository := Some("atala-prism.io"),
// dockerExposedPorts := Seq(8080),
// dockerBaseImage := "openjdk:11"
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")),
// ### Build Docker Image ###
Docker / maintainer := "[email protected]",
Docker / dockerRepository := Some("atala-prism.io"),
dockerExposedPorts := Seq(8080),
dockerBaseImage := "openjdk:11"
)
// .enablePlugins(JavaAppPackaging, DockerPlugin)
// .dependsOn(
// agentDidcommx,
// resolver,
// protocolInvitation,
// protocolConnection,
// protocolDidExchange,
// protocolMercuryMailbox,
// protocolReportProblem,
// protocolRouting,
// protocolIssueCredential
// )
.enablePlugins(JavaAppPackaging, DockerPlugin)
2 changes: 1 addition & 1 deletion mercury/mercury-mediator/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
// addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9") //1.9.11
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")

This file was deleted.

This file was deleted.

Loading