From 005cb8ceba2ed5281a2460bbb58737a7550cb72c Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 11 Jul 2023 17:07:56 +0200 Subject: [PATCH] Fix: sbt lists resolvers, not repositories (#577) --- .../main/scala/com/lightbend/paradox/markdown/Directive.scala | 4 ++-- .../lightbend/paradox/markdown/RepositoryDirectiveSpec.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/com/lightbend/paradox/markdown/Directive.scala b/core/src/main/scala/com/lightbend/paradox/markdown/Directive.scala index 3ebc10ea..40b5e8de 100644 --- a/core/src/main/scala/com/lightbend/paradox/markdown/Directive.scala +++ b/core/src/main/scala/com/lightbend/paradox/markdown/Directive.scala @@ -1106,9 +1106,9 @@ case class RepositoryDirective(ctx: Writer.Context) extends LeafBlockDirective(" } val repoStrings = repos match { - case Seq(r) => s"repositories += $r\n" + case Seq(r) => s"resolvers += $r\n" case rs => - Seq("repositories ++= Seq(\n", rs.map(a => s" $a").mkString(",\n"), "\n)\n").mkString + Seq("resolvers ++= Seq(\n", rs.map(a => s" $a").mkString(",\n"), "\n)\n").mkString } ("scala", repoStrings) diff --git a/tests/src/test/scala/com/lightbend/paradox/markdown/RepositoryDirectiveSpec.scala b/tests/src/test/scala/com/lightbend/paradox/markdown/RepositoryDirectiveSpec.scala index 5f074d7a..1218adf3 100644 --- a/tests/src/test/scala/com/lightbend/paradox/markdown/RepositoryDirectiveSpec.scala +++ b/tests/src/test/scala/com/lightbend/paradox/markdown/RepositoryDirectiveSpec.scala @@ -42,7 +42,7 @@ class RepositoryDirectiveSpec extends MarkdownBaseSpec { |
|
       |
-      |repositories += "Company repository".at("http://jars.acme.com")
+      |resolvers += "Company repository".at("http://jars.acme.com")
       |
       |
|
@@ -92,7 +92,7 @@ class RepositoryDirectiveSpec extends MarkdownBaseSpec { |
|
          |
-         |repositories ++= Seq(
+         |resolvers ++= Seq(
          |  "Company repository".at("http://jars.acme.com"),
          |  "Company repository 2".at("http://uberjars.acme.com")
          |)