Skip to content

Commit

Permalink
Sbt git upgrade (#896)
Browse files Browse the repository at this point in the history
* fix entaglement of dependencies on old version of sbt-git

* add colored prompt

* upgraded sbt-tpolecat

* revert tpolecat upgrade -defer for later

* remove unnecessary sbt build change
  • Loading branch information
yisraelU authored Jul 22, 2024
1 parent f60bb00 commit d2b4774
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 8 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import com.scalapenos.sbt.prompt.SbtPrompt.autoImport._
import com.scalapenos.sbt.prompt._
import Dependencies._
import microsites.ExtraMdFileConfig

Expand All @@ -9,6 +7,14 @@ ThisBuild / evictionErrorLevel := Level.Info
ThisBuild / mimaBaseVersion := "1.7.0"
Test / parallelExecution := false

val blue = "\u001b[34m"
val reset = "\u001b[0m"

def coloredPrompt(state: String, color: String): String =
s"$color$state$reset"

ThisBuild / shellPrompt := { state => s"${coloredPrompt("[sbt]", blue)} redis4cats λ " }

// publishing
ThisBuild / organization := "dev.profunktor"
ThisBuild / homepage := Some(url("https://redis4cats.profunktor.dev/"))
Expand All @@ -24,13 +30,6 @@ ThisBuild / developers := List(

Global / onChangedBuildSource := ReloadOnSourceChanges

promptTheme := PromptTheme(
List(
text("[sbt] ", fg(105)),
text(_ => "redis4cats", fg(15)).padRight(" λ ")
)
)

def pred[A](p: Boolean, t: => Seq[A], f: => Seq[A]): Seq[A] =
if (p) t else f

Expand Down
5 changes: 3 additions & 2 deletions project/MimaVersionPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.typesafe.sbt.GitPlugin
import com.typesafe.sbt.SbtGit.git
import com.github.sbt.git.SbtGit.{ git, GitKeys }
import com.github.sbt.git.GitPlugin
import com.github.sbt.git.GitRunner
import com.typesafe.tools.mima.plugin.MimaPlugin
import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport.*
import sbt.*
Expand Down
5 changes: 2 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")
addSbtPlugin("com.scalapenos" % "sbt-prompt" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-site" % "1.7.0")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")

0 comments on commit d2b4774

Please sign in to comment.