diff --git a/build.sbt b/build.sbt index 22f554bd..5b1729f3 100644 --- a/build.sbt +++ b/build.sbt @@ -47,6 +47,8 @@ lazy val root = (project in file(".")) name := "scurl-detector", crossScalaVersions := List("2.12.17", "2.13.8"), libraryDependencies ++= All, + buildInfoKeys := List[BuildInfoKey](organization, name, version), + buildInfoPackage := "detection", semanticdbEnabled := true, semanticdbVersion := scalafixSemanticdb.revision, scalacOptions += { @@ -56,6 +58,7 @@ lazy val root = (project in file(".")) } } ) + .enablePlugins(BuildInfoPlugin) lazy val docs = (project in file("scurl-detector-docs")) .settings( diff --git a/docs/overview/overview_index.md b/docs/overview/overview_index.md index 3fa61ba6..84c9c914 100644 --- a/docs/overview/overview_index.md +++ b/docs/overview/overview_index.md @@ -7,9 +7,10 @@ Scala URL Detector is a Scala library that detects and extracts URLs from text. ## Installation -To use the latest snapshot of Scala URL Detector in your project add the following to your build.sbt file: +To use the latest release of Scala URL Detector in your project add the following to your `build.sbt` file: -```scala -resolvers ++= Resolver.sonatypeOssRepos("snapshots") -libraryDependencies += "io.lambdaworks" %% "scurl-detector" % "@SNAPSHOT_VERSION@" +```scala mdoc:passthrough +println(s"""```scala""") +println(s"""libraryDependencies += "${detection.BuildInfo.organization}" %% "${detection.BuildInfo.name}" % "${detection.BuildInfo.version.split('+').head}"""") +println(s"""```""") ``` \ No newline at end of file diff --git a/project/plugin.sbt b/project/plugin.sbt index edea2c55..5e3a944e 100644 --- a/project/plugin.sbt +++ b/project/plugin.sbt @@ -3,3 +3,4 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.3") addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")