From ec361d2d84855c56abf338f99e29f1030728d716 Mon Sep 17 00:00:00 2001 From: mvelimir Date: Thu, 22 Sep 2022 23:00:35 +0200 Subject: [PATCH 1/2] Update the installation guide --- build.sbt | 3 +++ docs/overview/overview_index.md | 9 +++++---- project/plugin.sbt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 22f554bd..d9a20d36 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 := Seq[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") From 4557e88466cd59a691d71cfe02a391e4e0df2a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Velimir=20Milinkovi=C4=87?= <81649656+mvelimir@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:26:21 +0200 Subject: [PATCH 2/2] Change Seq to List --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d9a20d36..5b1729f3 100644 --- a/build.sbt +++ b/build.sbt @@ -47,7 +47,7 @@ lazy val root = (project in file(".")) name := "scurl-detector", crossScalaVersions := List("2.12.17", "2.13.8"), libraryDependencies ++= All, - buildInfoKeys := Seq[BuildInfoKey](organization, name, version), + buildInfoKeys := List[BuildInfoKey](organization, name, version), buildInfoPackage := "detection", semanticdbEnabled := true, semanticdbVersion := scalafixSemanticdb.revision,