diff --git a/README.md b/README.md index cb5abda..7c1438e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,30 @@ -# http4s-grpc - Http4s GRPC [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.http4s/http4s-grpc_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.http4s/http4s-grpc_2.13) ![Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-Scala-blue.svg) +# http4s-grpc -## [Head on over to the microsite](https://davenverse.github.io/http4s-grpc) +A pure Scala [gRPC] implementation! Use it with [http4s Ember] and deploy on JVM, Node.js, and Native. + +The generated APIs use Cats Effect and FS2, and are nearly drop-in replacements for code generated by [fs2-grpc]. + +[gRPC]: https://grpc.io/ +[http4s Ember]: https://http4s.org/v0.23/docs/integrations.html#ember +[fs2-grpc]: https://github.com/typelevel/fs2-grpc ## Quick Start -To use http4s-grpc in an existing SBT project with Scala 2.13 or a later version, add the following dependencies to your -`build.sbt` depending on your needs: +First add the plugin to `project/plugins.sbt`. ```scala -libraryDependencies ++= Seq( - "org.http4s" %% "http4s-grpc" % "" +addSbtPlugin("io.chrisdavenport" % "sbt-http4s-grpc" % "0.0.1") +``` + +Then in your `build.sbt` enable the `Http4sGrpcPlugin` to configure the http4s-grpc codegen. In addition, you will need to configure the [ScalaPB] codegen by following their [installation docs][ScalaPB installation]. + +```scala +enablePlugins(Http4sGrpcPlugin) +Compile / PB.targets ++= Seq( + // set grpc = false because http4s-grpc generates its own code + scalapb.gen(grpc = false) -> (Compile / sourceManaged).value / "scalapb" ) ``` + +[ScalaPB]: https://scalapb.github.io/ +[ScalaPB installation]: https://scalapb.github.io/docs/installation diff --git a/build.sbt b/build.sbt index 25b840c..c0014e7 100644 --- a/build.sbt +++ b/build.sbt @@ -9,6 +9,8 @@ ThisBuild / developers := List( ThisBuild / tlCiReleaseBranches := Seq("main") ThisBuild / tlSonatypeUseLegacyHost := true +ThisBuild / tlMimaPreviousVersions := Set() + val Scala212 = "2.12.17" val Scala213 = "2.13.10" diff --git a/docs/index.md b/docs/index.md index 89ac293..c60c998 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ The generated APIs use Cats Effect and FS2, and are nearly drop-in replacements First add the plugin to `project/plugins.sbt`. ```scala -addSbtPlugin("org.http4s" % "sbt-http4s-grpc" % "@VERSION@") +addSbtPlugin("io.chrisdavenport" % "sbt-http4s-grpc" % "@VERSION@") ``` Then in your `build.sbt` enable the `Http4sGrpcPlugin` to configure the http4s-grpc codegen. In addition, you will need to configure the [ScalaPB] codegen by following their [installation docs][ScalaPB installation].