Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Deps.*
import Util.*
import com.typesafe.tools.mima.core.*, ProblemFilters.*
Expand Down Expand Up @@ -222,7 +222,7 @@
jdk11settings,
),
)
.enablePlugins(SbtProguard)
.enablePlugins(SbtProguard, BuildInfoPlugin)
.dependsOn(launchInterfaceSub)
.settings(Util.base)
.settings(launchSettings)
Expand All @@ -237,6 +237,11 @@
scalacheck % Test,
junit % Test,
)
buildInfoKeys := Seq[BuildInfoKey](
version,
"coursierVersion" -> Deps.coursierVersion,
)
buildInfoPackage := "xsbt.boot"
testFrameworks += new TestFramework("verify.runner.Framework")
Test / compile := {
val ignore = testSamples.jvm.get.map(_ / publishLocal).join.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ class CousierUpdate(config: UpdateConfiguration):
case _ =>
if isWindows then windowsCacheDirectory
else CacheDefaults.location

/** HTTP User-Agent, overridable with -Dsbt.http.agent (same property as sbt). */
private def userAgent: String =
sys.props.get("sbt.http.agent").getOrElse {
s"Coursier/${BuildInfo.coursierVersion} (+https://github.com/coursier) " +
s"sbt-launcher/${BuildInfo.version} (+https://www.scala-sbt.org/)"
}

private lazy val coursierCache =
import coursier.util.Task
val credentials = bootCredentials
val cache = credentials.foldLeft(FileCache(defaultCacheLocation)(using Task.sync)) {
val cache = credentials.foldLeft(
FileCache(defaultCacheLocation)(using Task.sync).withUserAgent(userAgent)
) {
_.addCredentials(_)
}
cache
Expand Down
14 changes: 7 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.2")
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.3")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1")
addSbtPlugin("com.github.sbt" % "sbt-header" % "5.11.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.2")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.6")
addSbtPlugin("com.github.sbt" % "sbt-proguard" % "0.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.8")
addSbtPlugin("com.github.sbt" % "sbt-header" % "5.11.0")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2")

scalacOptions += "-feature"
Loading