diff --git a/build.sbt b/build.sbt index 6fb4ab7e..3736b11c 100644 --- a/build.sbt +++ b/build.sbt @@ -6,6 +6,7 @@ name := "bucky" lazy val scala212 = "2.12.21" lazy val scala213 = "2.13.18" +lazy val scala3 = "3.3.7" scalaVersion := scala213 scalacOptions += "-Ypartial-unification" @@ -49,11 +50,11 @@ releaseProcess := Seq[ReleaseStep]( commitNextVersion, pushChanges ) -ThisBuild / publish / skip := true -ThisBuild / sonatypeCredentialHost := "central.sonatype.com" -ThisBuild / sonatypeProfileName := "com.itv" -ThisBuild / versionScheme := Some("early-semver") -ThisBuild / publishMavenStyle := true +ThisBuild / publish / skip := true +ThisBuild / sonatypeCredentialHost := "central.sonatype.com" +ThisBuild / sonatypeProfileName := "com.itv" +ThisBuild / versionScheme := Some("early-semver") +ThisBuild / publishMavenStyle := true ThisBuild / credentials ++= (for { username <- Option(System.getenv().get("SONATYPE_USER")) password <- Option(System.getenv().get("SONATYPE_PASS")) @@ -75,10 +76,10 @@ lazy val kernelSettings = Seq( scalaVersion := scala213, organization := "com.itv", scalacOptions ++= Seq("-feature", "-deprecation", "-language:higherKinds"), - publishTo := sonatypePublishToBundle.value, - publishConfiguration := publishConfiguration.value.withOverwrite(isSnapshot.value), - publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(isSnapshot.value), - publish / skip := false, + publishTo := sonatypePublishToBundle.value, + publishConfiguration := publishConfiguration.value.withOverwrite(isSnapshot.value), + publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(isSnapshot.value), + publish / skip := false, publish / parallelExecution := false, pomExtra := https://github.com/ITV/bucky @@ -293,6 +294,19 @@ lazy val xml = project ) ) +lazy val docs = project + .in(file("mdoc")) + .enablePlugins(MdocPlugin) + .settings( + scalaVersion := scala213, + mdocVariables := Map( + "VERSION" -> version.value + ), + publish / skip := true, + publishArtifact := false + ) + .dependsOn(core, xml, circe, argonaut, test, backendFs2Rabbit, backendJavaAmqp) + lazy val root = (project in file(".")) - .aggregate(xml, circe, argonaut, example, test, backendJavaAmqp, backendFs2Rabbit, core) + .aggregate(xml, circe, argonaut, example, test, backendJavaAmqp, backendFs2Rabbit, core, docs) .settings(publishArtifact := false) diff --git a/docs/getting-started.md b/docs/getting-started.md index 578f5dc7..4b121d09 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -2,8 +2,8 @@ In order to get started with bucky, add the following to you `build.sbt`: - -```scala + +```scala val buckyVersion = "2.0.0-M10" libraryDependencies ++= Seq( "com.itv" %% "bucky-core" % buckyVersion, @@ -15,12 +15,12 @@ libraryDependencies ++= Seq( or for ammonite: ```scala -import $ivy.`com.itv::bucky-core:2.0.0-M10` +import $ivy.`com.itv::bucky-core:2.0.0-M10` import $ivy.`com.itv::bucky-circe:2.0.0-M10` ``` Imports, implicits and config: -```scala +```scala import cats._ import cats.implicits._ import cats.effect._ @@ -87,6 +87,6 @@ object MyApp extends IOApp { } ``` -For easiness of use, bucky supports the creation of [Wirings](./wiring). A [Wiring](./wiring) centralizes the definition +For easiness of use, bucky supports the creation of [Wirings](./wiring.md). A [Wiring](./wiring.md) centralizes the definition of both ends of the communication (consumer/publisher) as well as the declarations of queues and exchanges -in a single place. +in a single place. diff --git a/docs/index.md b/docs/index.md index 38b68bfd..58dae88b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,10 @@ ### Overview Bucky is a scala library developed at ITV which can be used to publish messages to a RabbitMQ broker as well as to consume messages. - + The library is built on top of the [java amqp client](https://github.com/rabbitmq/rabbitmq-java-client). Current version of bucky is based on: - + | Project | Version | |:------------|:--------:| | cats | 1.6.0 | @@ -12,11 +12,11 @@ Current version of bucky is based on: | amqp-client | 5.6.0 | #### Index -- [Introduction](./key-concepts) -- [Getting Started](./getting-started) -- [Publisher](./publisher) -- [Consumer](./consumer) -- [Wiring](./wiring) -- [Serialization](./serializing) -- [Testing](./testing) +- [Introduction](./key-concepts.md) +- [Getting Started](./getting-started.md) +- [Publisher](./publisher.md) +- [Consumer](./consumer.md) +- [Wiring](./wiring.md) +- [Serialization](./serializing.md) +- [Testing](./testing.md) diff --git a/project/plugins.sbt b/project/plugins.sbt index a302916c..6903410b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,4 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("org.openmole" % "scalatex-sbt-plugin" % "0.4.5") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.9.0" )