diff --git a/build.sbt b/build.sbt index e1c93c7..f26a720 100644 --- a/build.sbt +++ b/build.sbt @@ -35,19 +35,6 @@ lazy val root = (project in file(".")) // ------------------ // // -- DEPENDENCIES -- // // ------------------ // - addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2"), - addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1"), - addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0"), - addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1"), - addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0"), - addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0"), - addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1"), + PluginDependencies.deps, libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.17" % Test ) - -ThisBuild / dependencyOverrides ++= Seq( - "org.eclipse.jgit" % "org.eclipse.jgit" % "6.8.0.202311291450-r", // sbt-scalafix - "ch.qos.logback" % "logback-core" % "1.4.7", // sbt-sonatype - "com.google.guava" % "guava" % "23.0", // sbt-sonatype - "org.apache.httpcomponents" % "httpclient" % "4.5.14" // sbt-sonatype -) diff --git a/project/plugins.sbt b/project/plugins.sbt index 1866fed..da5689b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,22 +1,10 @@ // ------------------ // // -- DEPENDENCIES -- // // ------------------ // -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") - -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") -addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1") +PluginDependencies.deps // This project is its own plugin :) Compile / unmanagedSourceDirectories += baseDirectory.value.getParentFile / "src" / "main" / "scala" Compile / unmanagedResourceDirectories += baseDirectory.value.getParentFile / "src" / "main" / "resources" -dependencyOverrides ++= Seq( - "org.eclipse.jgit" % "org.eclipse.jgit" % "6.8.0.202311291450-r", // sbt-scalafix - "ch.qos.logback" % "logback-core" % "1.4.7", // sbt-sonatype - "com.google.guava" % "guava" % "23.0", // sbt-sonatype - "org.apache.httpcomponents" % "httpclient" % "4.5.14" // sbt-sonatype -) +Compile / unmanagedSources += baseDirectory.value / "project" / "PluginDependencies.scala" diff --git a/project/project/PluginDependencies.scala b/project/project/PluginDependencies.scala new file mode 100644 index 0000000..91e9ce8 --- /dev/null +++ b/project/project/PluginDependencies.scala @@ -0,0 +1,23 @@ +import sbt.* +import sbt.Keys.* + +object PluginDependencies { + val deps = Seq( + // ------------------ // + // -- DEPENDENCIES -- // + // ------------------ // + addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2"), + addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1"), + addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0"), + addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1"), + addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0"), + addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0"), + addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1"), + dependencyOverrides ++= Seq( + "org.eclipse.jgit" % "org.eclipse.jgit" % "6.8.0.202311291450-r", // sbt-scalafix + "ch.qos.logback" % "logback-core" % "1.4.7", // sbt-sonatype + "com.google.guava" % "guava" % "23.0", // sbt-sonatype + "org.apache.httpcomponents" % "httpclient" % "4.5.14" // sbt-sonatype + ) + ) +}