mirror of https://github.com/sbt/sbt.git
Merge pull request #7 from alexarchambault/develop
Add sbt-lm-coursier plugin
This commit is contained in:
commit
a554ec4f06
|
|
@ -16,6 +16,7 @@ jobs:
|
||||||
- env: SBT_COURSIER=1 SBT_COURSIER_TEST_GROUP=2
|
- env: SBT_COURSIER=1 SBT_COURSIER_TEST_GROUP=2
|
||||||
- env: SBT_SHADING=1
|
- env: SBT_SHADING=1
|
||||||
- env: SBT_PGP_COURSIER=1
|
- env: SBT_PGP_COURSIER=1
|
||||||
|
- env: LM_COURSIER=1
|
||||||
- stage: release
|
- stage: release
|
||||||
script: sbt ci-release
|
script: sbt ci-release
|
||||||
branches:
|
branches:
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ environment:
|
||||||
build_script:
|
build_script:
|
||||||
- ps: Start-Job -filepath .\metadata\scripts\start-it-auth-server.ps1 -ArgumentList $pwd\metadata, $env:TEST_REPOSITORY_HOST, $env:TEST_REPOSITORY_PORT, $env:TEST_REPOSITORY_USER, $env:TEST_REPOSITORY_PASSWORD
|
- ps: Start-Job -filepath .\metadata\scripts\start-it-auth-server.ps1 -ArgumentList $pwd\metadata, $env:TEST_REPOSITORY_HOST, $env:TEST_REPOSITORY_PORT, $env:TEST_REPOSITORY_USER, $env:TEST_REPOSITORY_PASSWORD
|
||||||
test_script:
|
test_script:
|
||||||
- sbt ++2.12.7 sbt-coursier/scripted sbt-shading/scripted
|
- sbt ++2.12.7 "sbt-lm-coursier/scripted shared-1/*" "sbt-lm-coursier/scripted shared-2/*" sbt-coursier/scripted sbt-shading/scripted
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
|
||||||
32
build.sbt
32
build.sbt
|
|
@ -19,16 +19,43 @@ val coursierVersion = "1.1.0-M8"
|
||||||
|
|
||||||
lazy val `lm-coursier` = project
|
lazy val `lm-coursier` = project
|
||||||
.in(file("modules/lm-coursier"))
|
.in(file("modules/lm-coursier"))
|
||||||
|
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
|
||||||
.settings(
|
.settings(
|
||||||
shared,
|
shared,
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"io.get-coursier" %% "coursier" % coursierVersion,
|
"io.get-coursier" %% "coursier" % coursierVersion,
|
||||||
"io.get-coursier" %% "coursier-cache" % coursierVersion,
|
"io.get-coursier" %% "coursier-cache" % coursierVersion,
|
||||||
"io.get-coursier" %% "coursier-extra" % coursierVersion,
|
"io.get-coursier" %% "coursier-extra" % coursierVersion,
|
||||||
"org.scala-sbt" %% "librarymanagement-core" % "1.0.2"
|
// We depend on librarymanagement-ivy rather than just
|
||||||
)
|
// librarymanagement-core to handle the ModuleDescriptor passed
|
||||||
|
// to DependencyResolutionInterface.update, which is an
|
||||||
|
// IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor
|
||||||
|
// is ignored).
|
||||||
|
"org.scala-sbt" %% "librarymanagement-ivy" % "1.0.2",
|
||||||
|
"org.scalatest" %% "scalatest" % "3.0.5" % Test
|
||||||
|
),
|
||||||
|
managedSourceDirectories in Compile +=
|
||||||
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
|
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
|
contrabandFormatsForType in generateContrabands in Compile := DatatypeConfig.getFormats
|
||||||
)
|
)
|
||||||
|
|
||||||
|
lazy val `sbt-lm-coursier` = project
|
||||||
|
.in(file("modules/sbt-lm-coursier"))
|
||||||
|
.enablePlugins(ScriptedPlugin)
|
||||||
|
.dependsOn(`lm-coursier`)
|
||||||
|
.settings(
|
||||||
|
plugin,
|
||||||
|
sbtTestDirectory := sbtTestDirectory.in(`sbt-coursier`).value,
|
||||||
|
scriptedDependencies := {
|
||||||
|
scriptedDependencies.value
|
||||||
|
|
||||||
|
// TODO Get those automatically
|
||||||
|
// (but shouldn't scripted itself handle that…?)
|
||||||
|
publishLocal.in(`lm-coursier`).value
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
lazy val `sbt-coursier` = project
|
lazy val `sbt-coursier` = project
|
||||||
.in(file("modules/sbt-coursier"))
|
.in(file("modules/sbt-coursier"))
|
||||||
.enablePlugins(ScriptedPlugin)
|
.enablePlugins(ScriptedPlugin)
|
||||||
|
|
@ -93,6 +120,7 @@ lazy val `sbt-coursier-root` = project
|
||||||
.aggregate(
|
.aggregate(
|
||||||
`lm-coursier`,
|
`lm-coursier`,
|
||||||
`sbt-coursier`,
|
`sbt-coursier`,
|
||||||
|
`sbt-lm-coursier`,
|
||||||
`sbt-pgp-coursier`,
|
`sbt-pgp-coursier`,
|
||||||
`sbt-shading`
|
`sbt-shading`
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
/**
|
||||||
|
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
|
||||||
|
*/
|
||||||
|
|
||||||
|
// DO NOT EDIT MANUALLY
|
||||||
|
package coursier.lmcoursier
|
||||||
|
final class CoursierConfiguration private (
|
||||||
|
val log: Option[xsbti.Logger],
|
||||||
|
val resolvers: Vector[sbt.librarymanagement.Resolver],
|
||||||
|
val otherResolvers: Vector[sbt.librarymanagement.Resolver],
|
||||||
|
val reorderResolvers: Boolean,
|
||||||
|
val parallelDownloads: Int,
|
||||||
|
val maxIterations: Int,
|
||||||
|
val sbtScalaOrganization: Option[String],
|
||||||
|
val sbtScalaVersion: Option[String],
|
||||||
|
val sbtScalaJars: Vector[java.io.File]) extends Serializable {
|
||||||
|
|
||||||
|
private def this() = this(None, sbt.librarymanagement.Resolver.defaults, Vector.empty, true, 6, 100, None, None, Vector.empty)
|
||||||
|
|
||||||
|
override def equals(o: Any): Boolean = o match {
|
||||||
|
case x: CoursierConfiguration => (this.log == x.log) && (this.resolvers == x.resolvers) && (this.otherResolvers == x.otherResolvers) && (this.reorderResolvers == x.reorderResolvers) && (this.parallelDownloads == x.parallelDownloads) && (this.maxIterations == x.maxIterations) && (this.sbtScalaOrganization == x.sbtScalaOrganization) && (this.sbtScalaVersion == x.sbtScalaVersion) && (this.sbtScalaJars == x.sbtScalaJars)
|
||||||
|
case _ => false
|
||||||
|
}
|
||||||
|
override def hashCode: Int = {
|
||||||
|
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "coursier.lmcoursier.CoursierConfiguration".##) + log.##) + resolvers.##) + otherResolvers.##) + reorderResolvers.##) + parallelDownloads.##) + maxIterations.##) + sbtScalaOrganization.##) + sbtScalaVersion.##) + sbtScalaJars.##)
|
||||||
|
}
|
||||||
|
override def toString: String = {
|
||||||
|
"CoursierConfiguration(" + log + ", " + resolvers + ", " + otherResolvers + ", " + reorderResolvers + ", " + parallelDownloads + ", " + maxIterations + ", " + sbtScalaOrganization + ", " + sbtScalaVersion + ", " + sbtScalaJars + ")"
|
||||||
|
}
|
||||||
|
private[this] def copy(log: Option[xsbti.Logger] = log, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers, otherResolvers: Vector[sbt.librarymanagement.Resolver] = otherResolvers, reorderResolvers: Boolean = reorderResolvers, parallelDownloads: Int = parallelDownloads, maxIterations: Int = maxIterations, sbtScalaOrganization: Option[String] = sbtScalaOrganization, sbtScalaVersion: Option[String] = sbtScalaVersion, sbtScalaJars: Vector[java.io.File] = sbtScalaJars): CoursierConfiguration = {
|
||||||
|
new CoursierConfiguration(log, resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars)
|
||||||
|
}
|
||||||
|
def withLog(log: Option[xsbti.Logger]): CoursierConfiguration = {
|
||||||
|
copy(log = log)
|
||||||
|
}
|
||||||
|
def withLog(log: xsbti.Logger): CoursierConfiguration = {
|
||||||
|
copy(log = Option(log))
|
||||||
|
}
|
||||||
|
def withResolvers(resolvers: Vector[sbt.librarymanagement.Resolver]): CoursierConfiguration = {
|
||||||
|
copy(resolvers = resolvers)
|
||||||
|
}
|
||||||
|
def withOtherResolvers(otherResolvers: Vector[sbt.librarymanagement.Resolver]): CoursierConfiguration = {
|
||||||
|
copy(otherResolvers = otherResolvers)
|
||||||
|
}
|
||||||
|
def withReorderResolvers(reorderResolvers: Boolean): CoursierConfiguration = {
|
||||||
|
copy(reorderResolvers = reorderResolvers)
|
||||||
|
}
|
||||||
|
def withParallelDownloads(parallelDownloads: Int): CoursierConfiguration = {
|
||||||
|
copy(parallelDownloads = parallelDownloads)
|
||||||
|
}
|
||||||
|
def withMaxIterations(maxIterations: Int): CoursierConfiguration = {
|
||||||
|
copy(maxIterations = maxIterations)
|
||||||
|
}
|
||||||
|
def withSbtScalaOrganization(sbtScalaOrganization: Option[String]): CoursierConfiguration = {
|
||||||
|
copy(sbtScalaOrganization = sbtScalaOrganization)
|
||||||
|
}
|
||||||
|
def withSbtScalaOrganization(sbtScalaOrganization: String): CoursierConfiguration = {
|
||||||
|
copy(sbtScalaOrganization = Option(sbtScalaOrganization))
|
||||||
|
}
|
||||||
|
def withSbtScalaVersion(sbtScalaVersion: Option[String]): CoursierConfiguration = {
|
||||||
|
copy(sbtScalaVersion = sbtScalaVersion)
|
||||||
|
}
|
||||||
|
def withSbtScalaVersion(sbtScalaVersion: String): CoursierConfiguration = {
|
||||||
|
copy(sbtScalaVersion = Option(sbtScalaVersion))
|
||||||
|
}
|
||||||
|
def withSbtScalaJars(sbtScalaJars: Vector[java.io.File]): CoursierConfiguration = {
|
||||||
|
copy(sbtScalaJars = sbtScalaJars)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
object CoursierConfiguration {
|
||||||
|
|
||||||
|
def apply(): CoursierConfiguration = new CoursierConfiguration()
|
||||||
|
def apply(log: Option[xsbti.Logger], resolvers: Vector[sbt.librarymanagement.Resolver], otherResolvers: Vector[sbt.librarymanagement.Resolver], reorderResolvers: Boolean, parallelDownloads: Int, maxIterations: Int, sbtScalaOrganization: Option[String], sbtScalaVersion: Option[String], sbtScalaJars: Vector[java.io.File]): CoursierConfiguration = new CoursierConfiguration(log, resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars)
|
||||||
|
def apply(log: xsbti.Logger, resolvers: Vector[sbt.librarymanagement.Resolver], otherResolvers: Vector[sbt.librarymanagement.Resolver], reorderResolvers: Boolean, parallelDownloads: Int, maxIterations: Int, sbtScalaOrganization: String, sbtScalaVersion: String, sbtScalaJars: Vector[java.io.File]): CoursierConfiguration = new CoursierConfiguration(Option(log), resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, Option(sbtScalaOrganization), Option(sbtScalaVersion), sbtScalaJars)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
/**
|
||||||
|
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
|
||||||
|
*/
|
||||||
|
|
||||||
|
// DO NOT EDIT MANUALLY
|
||||||
|
package coursier.lmcoursier
|
||||||
|
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||||
|
trait CoursierConfigurationFormats { self: sbt.internal.librarymanagement.formats.LoggerFormat with sbt.librarymanagement.ResolverFormats with sjsonnew.BasicJsonProtocol =>
|
||||||
|
implicit lazy val CoursierConfigurationFormat: JsonFormat[coursier.lmcoursier.CoursierConfiguration] = new JsonFormat[coursier.lmcoursier.CoursierConfiguration] {
|
||||||
|
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): coursier.lmcoursier.CoursierConfiguration = {
|
||||||
|
jsOpt match {
|
||||||
|
case Some(js) =>
|
||||||
|
unbuilder.beginObject(js)
|
||||||
|
val log = unbuilder.readField[Option[xsbti.Logger]]("log")
|
||||||
|
val resolvers = unbuilder.readField[Vector[sbt.librarymanagement.Resolver]]("resolvers")
|
||||||
|
val otherResolvers = unbuilder.readField[Vector[sbt.librarymanagement.Resolver]]("otherResolvers")
|
||||||
|
val reorderResolvers = unbuilder.readField[Boolean]("reorderResolvers")
|
||||||
|
val parallelDownloads = unbuilder.readField[Int]("parallelDownloads")
|
||||||
|
val maxIterations = unbuilder.readField[Int]("maxIterations")
|
||||||
|
val sbtScalaOrganization = unbuilder.readField[Option[String]]("sbtScalaOrganization")
|
||||||
|
val sbtScalaVersion = unbuilder.readField[Option[String]]("sbtScalaVersion")
|
||||||
|
val sbtScalaJars = unbuilder.readField[Vector[java.io.File]]("sbtScalaJars")
|
||||||
|
unbuilder.endObject()
|
||||||
|
coursier.lmcoursier.CoursierConfiguration(log, resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars)
|
||||||
|
case None =>
|
||||||
|
deserializationError("Expected JsObject but found None")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
override def write[J](obj: coursier.lmcoursier.CoursierConfiguration, builder: Builder[J]): Unit = {
|
||||||
|
builder.beginObject()
|
||||||
|
builder.addField("log", obj.log)
|
||||||
|
builder.addField("resolvers", obj.resolvers)
|
||||||
|
builder.addField("otherResolvers", obj.otherResolvers)
|
||||||
|
builder.addField("reorderResolvers", obj.reorderResolvers)
|
||||||
|
builder.addField("parallelDownloads", obj.parallelDownloads)
|
||||||
|
builder.addField("maxIterations", obj.maxIterations)
|
||||||
|
builder.addField("sbtScalaOrganization", obj.sbtScalaOrganization)
|
||||||
|
builder.addField("sbtScalaVersion", obj.sbtScalaVersion)
|
||||||
|
builder.addField("sbtScalaJars", obj.sbtScalaJars)
|
||||||
|
builder.endObject()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
"codecNamespace": "coursier.lmcoursier",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"name": "CoursierConfiguration",
|
||||||
|
"namespace": "coursier.lmcoursier",
|
||||||
|
"target": "Scala",
|
||||||
|
"type": "record",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "log",
|
||||||
|
"type": "xsbti.Logger?",
|
||||||
|
"default": "None",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "resolvers",
|
||||||
|
"type": "sbt.librarymanagement.Resolver*",
|
||||||
|
"default": "sbt.librarymanagement.Resolver.defaults",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "otherResolvers",
|
||||||
|
"type": "sbt.librarymanagement.Resolver*",
|
||||||
|
"default": "Vector.empty",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "reorderResolvers",
|
||||||
|
"type": "Boolean",
|
||||||
|
"default": "true",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "parallelDownloads",
|
||||||
|
"type": "Int",
|
||||||
|
"default": "6",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "maxIterations",
|
||||||
|
"type": "Int",
|
||||||
|
"default": "100",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sbtScalaOrganization",
|
||||||
|
"type": "String?",
|
||||||
|
"default": "None",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sbtScalaVersion",
|
||||||
|
"type": "String?",
|
||||||
|
"default": "None",
|
||||||
|
"since": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sbtScalaJars",
|
||||||
|
"type": "java.io.File*",
|
||||||
|
"default": "Vector.empty",
|
||||||
|
"since": "0.0.1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.concurrent.ExecutorService
|
import java.util.concurrent.ExecutorService
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import java.io.{File, OutputStreamWriter}
|
||||||
|
|
||||||
|
import _root_.coursier.{Artifact, Cache, CachePolicy, FileError, Organization, Project, Resolution, TermDisplay, organizationString}
|
||||||
|
import _root_.coursier.core.Configuration
|
||||||
|
import _root_.coursier.ivy.IvyRepository
|
||||||
|
import sbt.internal.librarymanagement.IvySbt
|
||||||
|
import sbt.librarymanagement._
|
||||||
|
import sbt.util.Logger
|
||||||
|
|
||||||
|
class CoursierDependencyResolution(conf: CoursierConfiguration) extends DependencyResolutionInterface {
|
||||||
|
|
||||||
|
private def sbtBinaryVersion = "1.0"
|
||||||
|
|
||||||
|
lazy val resolvers =
|
||||||
|
if (conf.reorderResolvers)
|
||||||
|
ResolutionParams.reorderResolvers(conf.resolvers)
|
||||||
|
else
|
||||||
|
conf.resolvers
|
||||||
|
|
||||||
|
def moduleDescriptor(moduleSetting: ModuleDescriptorConfiguration): CoursierModuleDescriptor =
|
||||||
|
CoursierModuleDescriptor(moduleSetting, conf)
|
||||||
|
|
||||||
|
def update(
|
||||||
|
module: ModuleDescriptor,
|
||||||
|
configuration: UpdateConfiguration,
|
||||||
|
uwconfig: UnresolvedWarningConfiguration,
|
||||||
|
log: Logger
|
||||||
|
): Either[UnresolvedWarning, UpdateReport] = {
|
||||||
|
|
||||||
|
// TODO Take stuff in configuration into account? uwconfig too?
|
||||||
|
|
||||||
|
val module0 = module match {
|
||||||
|
case c: CoursierModuleDescriptor =>
|
||||||
|
// seems not to happen, not sure what DependencyResolutionInterface.moduleDescriptor is for
|
||||||
|
c.descriptor
|
||||||
|
case i: IvySbt#Module =>
|
||||||
|
i.moduleSettings match {
|
||||||
|
case d: ModuleDescriptorConfiguration => d
|
||||||
|
case other => sys.error(s"unrecognized module settings: $other")
|
||||||
|
}
|
||||||
|
case _ =>
|
||||||
|
sys.error(s"unrecognized ModuleDescriptor type: $module")
|
||||||
|
}
|
||||||
|
|
||||||
|
val so = module0.scalaModuleInfo.fold(org"org.scala-lang")(m => Organization(m.scalaOrganization))
|
||||||
|
val sv = module0.scalaModuleInfo.map(_.scalaFullVersion)
|
||||||
|
// FIXME Manage to do stuff below without a scala version?
|
||||||
|
.getOrElse(scala.util.Properties.versionNumberString)
|
||||||
|
|
||||||
|
val sbv = module0.scalaModuleInfo.map(_.scalaBinaryVersion).getOrElse {
|
||||||
|
sv.split('.').take(2).mkString(".")
|
||||||
|
}
|
||||||
|
|
||||||
|
val verbosityLevel = 0
|
||||||
|
|
||||||
|
val ttl = Cache.defaultTtl
|
||||||
|
val createLogger = { () =>
|
||||||
|
new TermDisplay(new OutputStreamWriter(System.err), fallbackMode = true)
|
||||||
|
}
|
||||||
|
val cache = Cache.default
|
||||||
|
val cachePolicies = CachePolicy.default
|
||||||
|
val checksums = Cache.defaultChecksums
|
||||||
|
val projectName = "" // used for logging only…
|
||||||
|
|
||||||
|
val ivyProperties = ResolutionParams.defaultIvyProperties()
|
||||||
|
|
||||||
|
val mainRepositories = resolvers
|
||||||
|
.flatMap { resolver =>
|
||||||
|
FromSbt.repository(
|
||||||
|
resolver,
|
||||||
|
ivyProperties,
|
||||||
|
log,
|
||||||
|
None // FIXME What about authentication?
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val globalPluginsRepos =
|
||||||
|
for (p <- ResolutionParams.globalPluginPatterns(sbtBinaryVersion))
|
||||||
|
yield IvyRepository.fromPattern(
|
||||||
|
p,
|
||||||
|
withChecksums = false,
|
||||||
|
withSignatures = false,
|
||||||
|
withArtifacts = false
|
||||||
|
)
|
||||||
|
|
||||||
|
val interProjectDependencies: Seq[Project] = Nil // TODO Don't use Nil here
|
||||||
|
val interProjectRepo = InterProjectRepository(interProjectDependencies)
|
||||||
|
|
||||||
|
val internalRepositories = globalPluginsRepos :+ interProjectRepo
|
||||||
|
|
||||||
|
val dependencies = module0.dependencies.flatMap { d =>
|
||||||
|
// crossVersion already taken into account, wiping it here
|
||||||
|
val d0 = d.withCrossVersion(CrossVersion.Disabled())
|
||||||
|
FromSbt.dependencies(d0, sv, sbv)
|
||||||
|
}
|
||||||
|
|
||||||
|
val configGraphs = Inputs.ivyGraphs(
|
||||||
|
Inputs.configExtends(module0.configurations)
|
||||||
|
)
|
||||||
|
|
||||||
|
val resolutionParams = ResolutionParams(
|
||||||
|
dependencies = dependencies,
|
||||||
|
fallbackDependencies = Nil,
|
||||||
|
configGraphs = configGraphs,
|
||||||
|
autoScalaLib = true,
|
||||||
|
mainRepositories = mainRepositories,
|
||||||
|
parentProjectCache = Map.empty,
|
||||||
|
interProjectDependencies = interProjectDependencies,
|
||||||
|
internalRepositories = internalRepositories,
|
||||||
|
userEnabledProfiles = Set.empty,
|
||||||
|
userForceVersions = Map.empty,
|
||||||
|
typelevel = false,
|
||||||
|
so = so,
|
||||||
|
sv = sv,
|
||||||
|
sbtClassifiers = false,
|
||||||
|
parallelDownloads = conf.parallelDownloads,
|
||||||
|
projectName = projectName,
|
||||||
|
maxIterations = conf.maxIterations,
|
||||||
|
createLogger = createLogger,
|
||||||
|
cache = cache,
|
||||||
|
cachePolicies = cachePolicies,
|
||||||
|
ttl = ttl,
|
||||||
|
checksums = checksums
|
||||||
|
)
|
||||||
|
|
||||||
|
def artifactsParams(resolutions: Map[Set[Configuration], Resolution]) =
|
||||||
|
ArtifactsParams(
|
||||||
|
classifiers = None,
|
||||||
|
res = resolutions.values.toSeq,
|
||||||
|
includeSignatures = false,
|
||||||
|
parallelDownloads = conf.parallelDownloads,
|
||||||
|
createLogger = createLogger,
|
||||||
|
cache = cache,
|
||||||
|
artifactsChecksums = checksums,
|
||||||
|
ttl = ttl,
|
||||||
|
cachePolicies = cachePolicies,
|
||||||
|
projectName = projectName,
|
||||||
|
sbtClassifiers = false
|
||||||
|
)
|
||||||
|
|
||||||
|
val sbtBootJarOverrides = SbtBootJars(
|
||||||
|
conf.sbtScalaOrganization.fold(org"org.scala-lang")(Organization(_)),
|
||||||
|
conf.sbtScalaVersion.getOrElse(sv),
|
||||||
|
conf.sbtScalaJars
|
||||||
|
)
|
||||||
|
|
||||||
|
val configs = Inputs.coursierConfigurations(module0.configurations)
|
||||||
|
|
||||||
|
def updateParams(
|
||||||
|
resolutions: Map[Set[Configuration], Resolution],
|
||||||
|
artifacts: Map[Artifact, Either[FileError, File]]
|
||||||
|
) =
|
||||||
|
UpdateParams(
|
||||||
|
shadedConfigOpt = None,
|
||||||
|
artifacts = artifacts,
|
||||||
|
classifiers = None,
|
||||||
|
configs = configs,
|
||||||
|
dependencies = dependencies,
|
||||||
|
res = resolutions,
|
||||||
|
ignoreArtifactErrors = false,
|
||||||
|
includeSignatures = false,
|
||||||
|
sbtBootJarOverrides = sbtBootJarOverrides
|
||||||
|
)
|
||||||
|
|
||||||
|
val e = for {
|
||||||
|
resolutions <- ResolutionRun.resolutions(resolutionParams, verbosityLevel, log)
|
||||||
|
artifactsParams0 = artifactsParams(resolutions)
|
||||||
|
artifacts <- ArtifactsRun.artifacts(artifactsParams0, verbosityLevel, log)
|
||||||
|
updateParams0 = updateParams(resolutions, artifacts)
|
||||||
|
updateReport <- UpdateRun.update(updateParams0, verbosityLevel, log)
|
||||||
|
} yield updateReport
|
||||||
|
|
||||||
|
e.left.map(unresolvedWarningOrThrow(uwconfig, _))
|
||||||
|
}
|
||||||
|
|
||||||
|
private def resolutionException(ex: ResolutionError): Either[Throwable, ResolveException] =
|
||||||
|
ex match {
|
||||||
|
case e: ResolutionError.MetadataDownloadErrors =>
|
||||||
|
val r = new ResolveException(
|
||||||
|
e.errors.flatMap(_._2),
|
||||||
|
e.errors.map {
|
||||||
|
case ((mod, ver), _) =>
|
||||||
|
ModuleID(mod.organization.value, mod.name.value, ver)
|
||||||
|
.withExtraAttributes(mod.attributes)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
Right(r)
|
||||||
|
case _ => Left(ex.exception())
|
||||||
|
}
|
||||||
|
|
||||||
|
private def unresolvedWarningOrThrow(
|
||||||
|
uwconfig: UnresolvedWarningConfiguration,
|
||||||
|
ex: ResolutionError
|
||||||
|
): UnresolvedWarning =
|
||||||
|
resolutionException(ex) match {
|
||||||
|
case Left(t) => throw t
|
||||||
|
case Right(e) =>
|
||||||
|
UnresolvedWarning(e, uwconfig)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
object CoursierDependencyResolution {
|
||||||
|
def apply(configuration: CoursierConfiguration): DependencyResolution =
|
||||||
|
DependencyResolution(new CoursierDependencyResolution(configuration))
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import sbt.librarymanagement.LibraryManagementCodec
|
||||||
|
|
||||||
|
trait CoursierLibraryManagementCodec
|
||||||
|
extends sjsonnew.BasicJsonProtocol
|
||||||
|
with LibraryManagementCodec
|
||||||
|
// with sbt.internal.librarymanagement.formats.GlobalLockFormat
|
||||||
|
with sbt.internal.librarymanagement.formats.LoggerFormat
|
||||||
|
with sbt.librarymanagement.ResolverFormats
|
||||||
|
with CoursierConfigurationFormats
|
||||||
|
|
||||||
|
object CoursierLibraryManagementCodec extends CoursierLibraryManagementCodec
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import sbt.librarymanagement._
|
||||||
|
import sjsonnew.support.murmurhash.Hasher
|
||||||
|
|
||||||
|
final case class CoursierModuleDescriptor(
|
||||||
|
descriptor: ModuleDescriptorConfiguration,
|
||||||
|
conf: CoursierConfiguration
|
||||||
|
) extends ModuleDescriptor {
|
||||||
|
|
||||||
|
def directDependencies: Vector[ModuleID] =
|
||||||
|
descriptor.dependencies
|
||||||
|
|
||||||
|
def scalaModuleInfo: Option[ScalaModuleInfo] =
|
||||||
|
descriptor.scalaModuleInfo
|
||||||
|
|
||||||
|
def moduleSettings: CoursierModuleSettings =
|
||||||
|
CoursierModuleSettings()
|
||||||
|
|
||||||
|
lazy val extraInputHash: Long = {
|
||||||
|
import CustomLibraryManagementCodec._
|
||||||
|
Hasher.hash(conf).toOption.fold(0L)(_.toLong)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import sbt.librarymanagement.ModuleSettings
|
||||||
|
|
||||||
|
case class CoursierModuleSettings() extends ModuleSettings
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import sbt.librarymanagement.Resolver
|
||||||
|
import sjsonnew.JsonFormat
|
||||||
|
|
||||||
|
object CustomLibraryManagementCodec extends CoursierLibraryManagementCodec {
|
||||||
|
|
||||||
|
private type ConfFormat = (
|
||||||
|
Vector[Resolver],
|
||||||
|
Vector[Resolver],
|
||||||
|
Boolean,
|
||||||
|
Int,
|
||||||
|
Int
|
||||||
|
)
|
||||||
|
|
||||||
|
private def from(c: CoursierConfiguration): ConfFormat =
|
||||||
|
(
|
||||||
|
c.resolvers,
|
||||||
|
c.otherResolvers,
|
||||||
|
c.reorderResolvers,
|
||||||
|
c.parallelDownloads,
|
||||||
|
c.maxIterations
|
||||||
|
)
|
||||||
|
|
||||||
|
private def to(c: ConfFormat): CoursierConfiguration =
|
||||||
|
CoursierConfiguration()
|
||||||
|
.withResolvers(c._1)
|
||||||
|
.withOtherResolvers(c._2)
|
||||||
|
.withReorderResolvers(c._3)
|
||||||
|
.withParallelDownloads(c._4)
|
||||||
|
.withMaxIterations(c._5)
|
||||||
|
|
||||||
|
// Redefine to use a subset of properties, that are serializable
|
||||||
|
override implicit lazy val CoursierConfigurationFormat: JsonFormat[CoursierConfiguration] =
|
||||||
|
projectFormat[CoursierConfiguration, ConfFormat](from, to)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import coursier.ivy.IvyRepository
|
import coursier.ivy.IvyRepository
|
||||||
import coursier.ivy.IvyXml.{mappings => ivyXmlMappings}
|
import coursier.ivy.IvyXml.{mappings => ivyXmlMappings}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import coursier.core.{Configuration, ModuleName, Organization, Project}
|
import coursier.core.{Configuration, ModuleName, Organization, Project}
|
||||||
import sbt.librarymanagement.{InclExclRule, ModuleID}
|
import sbt.librarymanagement.{InclExclRule, ModuleID}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import coursier.Fetch
|
import coursier.Fetch
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
object Lock {
|
object Lock {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import coursier.FileError
|
import coursier.FileError
|
||||||
import coursier.core.Module
|
import coursier.core.Module
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
final class ResolutionException(
|
final class ResolutionException(
|
||||||
val error: ResolutionError
|
val error: ResolutionError
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService
|
import java.util.concurrent.ExecutorService
|
||||||
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import sbt.librarymanagement.{ MavenRepository, Resolver, URLRepository }
|
||||||
|
|
||||||
|
object Resolvers {
|
||||||
|
|
||||||
|
private val slowReposBase = Seq(
|
||||||
|
"https://repo.typesafe.com/",
|
||||||
|
"https://repo.scala-sbt.org/",
|
||||||
|
"http://repo.typesafe.com/",
|
||||||
|
"http://repo.scala-sbt.org/"
|
||||||
|
)
|
||||||
|
|
||||||
|
private val fastReposBase = Seq(
|
||||||
|
"http://repo1.maven.org/",
|
||||||
|
"https://repo1.maven.org/"
|
||||||
|
)
|
||||||
|
|
||||||
|
private def url(res: Resolver): Option[String] =
|
||||||
|
res match {
|
||||||
|
case m: MavenRepository =>
|
||||||
|
Some(m.root)
|
||||||
|
case u: URLRepository =>
|
||||||
|
u.patterns.artifactPatterns.headOption
|
||||||
|
.orElse(u.patterns.ivyPatterns.headOption)
|
||||||
|
case _ =>
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
private def filterResolvers(bases: Seq[String],
|
||||||
|
resolvers: Seq[(Resolver, Option[String])]): Seq[Resolver] =
|
||||||
|
resolvers
|
||||||
|
.filter(tuple => tuple._2.exists(url => bases.exists(base => url.startsWith(base))))
|
||||||
|
.map(_._1)
|
||||||
|
|
||||||
|
def reorder(resolvers: Seq[Resolver]): Seq[Resolver] = {
|
||||||
|
|
||||||
|
val byUrl = resolvers.map(r => (r, url(r)))
|
||||||
|
|
||||||
|
val fast = filterResolvers(fastReposBase, byUrl)
|
||||||
|
val slow = filterResolvers(slowReposBase, byUrl)
|
||||||
|
val rest = resolvers.diff(fast).diff(slow)
|
||||||
|
|
||||||
|
val reordered = fast ++ rest ++ slow
|
||||||
|
assert(reordered.size == resolvers.size,
|
||||||
|
"Reordered resolvers should be the same size as the unordered ones.")
|
||||||
|
|
||||||
|
reordered
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.lmcoursier
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
package coursier.lmcoursier
|
||||||
|
|
||||||
|
import org.scalatest.{Matchers, PropSpec}
|
||||||
|
import sbt.internal.librarymanagement.cross.CrossVersionUtil
|
||||||
|
import sbt.internal.util.ConsoleLogger
|
||||||
|
import sbt.librarymanagement._
|
||||||
|
import sbt.librarymanagement.Configurations.Component
|
||||||
|
import sbt.librarymanagement.Resolver.{DefaultMavenRepository, JCenterRepository, JavaNet2Repository}
|
||||||
|
import sbt.librarymanagement.{Resolver, UnresolvedWarningConfiguration, UpdateConfiguration}
|
||||||
|
import sbt.librarymanagement.syntax._
|
||||||
|
|
||||||
|
final class ResolutionSpec extends PropSpec with Matchers {
|
||||||
|
|
||||||
|
lazy val log = ConsoleLogger()
|
||||||
|
|
||||||
|
def configurations = Vector(Compile, Test, Runtime, Provided, Optional, Component)
|
||||||
|
def module(
|
||||||
|
lmEngine: DependencyResolution,
|
||||||
|
moduleId: ModuleID,
|
||||||
|
deps: Vector[ModuleID],
|
||||||
|
scalaFullVersion: Option[String],
|
||||||
|
overrideScalaVersion: Boolean = true
|
||||||
|
): ModuleDescriptor = {
|
||||||
|
val scalaModuleInfo = scalaFullVersion map { fv =>
|
||||||
|
ScalaModuleInfo(
|
||||||
|
scalaFullVersion = fv,
|
||||||
|
scalaBinaryVersion = CrossVersionUtil.binaryScalaVersion(fv),
|
||||||
|
configurations = configurations,
|
||||||
|
checkExplicit = true,
|
||||||
|
filterImplicit = false,
|
||||||
|
overrideScalaVersion = overrideScalaVersion
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val moduleSetting = ModuleDescriptorConfiguration(moduleId, ModuleInfo("foo"))
|
||||||
|
.withDependencies(deps)
|
||||||
|
.withConfigurations(configurations)
|
||||||
|
.withScalaModuleInfo(scalaModuleInfo)
|
||||||
|
lmEngine.moduleDescriptor(moduleSetting)
|
||||||
|
}
|
||||||
|
|
||||||
|
def resolvers = Vector(
|
||||||
|
DefaultMavenRepository,
|
||||||
|
JavaNet2Repository,
|
||||||
|
JCenterRepository,
|
||||||
|
Resolver.sbtPluginRepo("releases")
|
||||||
|
)
|
||||||
|
|
||||||
|
val lmEngine = CoursierDependencyResolution(CoursierConfiguration().withResolvers(resolvers))
|
||||||
|
|
||||||
|
private final val stubModule = "com.example" % "foo" % "0.1.0" % "compile"
|
||||||
|
|
||||||
|
property("very simple module") {
|
||||||
|
val dependencies = Vector(
|
||||||
|
"com.typesafe.scala-logging" % "scala-logging_2.12" % "3.7.2" % "compile",
|
||||||
|
"org.scalatest" % "scalatest_2.12" % "3.0.4" % "test"
|
||||||
|
).map(_.withIsTransitive(false))
|
||||||
|
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
resolution should be('right)
|
||||||
|
val r = resolution.right.get
|
||||||
|
r.configurations.map(_.configuration) should have size configurations.length
|
||||||
|
|
||||||
|
val compileConfig = r.configurations.find(_.configuration == Compile.toConfigRef).get
|
||||||
|
compileConfig.modules should have size 1
|
||||||
|
|
||||||
|
val runtimeConfig = r.configurations.find(_.configuration == Runtime.toConfigRef).get
|
||||||
|
runtimeConfig.modules should have size 1
|
||||||
|
|
||||||
|
val testConfig = r.configurations.find(_.configuration == Test.toConfigRef).get
|
||||||
|
testConfig.modules should have size 2
|
||||||
|
}
|
||||||
|
|
||||||
|
property("resolve compiler bridge") {
|
||||||
|
val dependencies =
|
||||||
|
Vector(("org.scala-sbt" % "compiler-interface" % "1.0.4" % "component").sources())
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
val r = resolution.right.get
|
||||||
|
|
||||||
|
val componentConfig = r.configurations.find(_.configuration == Component.toConfigRef).get
|
||||||
|
componentConfig.modules should have size 2
|
||||||
|
componentConfig.modules.head.artifacts should have size 1
|
||||||
|
componentConfig.modules.head.artifacts.head._1.classifier should contain("sources")
|
||||||
|
}
|
||||||
|
|
||||||
|
property("resolve sbt jars") {
|
||||||
|
val dependencies =
|
||||||
|
Vector("org.scala-sbt" % "sbt" % "1.1.0" % "provided")
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
val r = resolution.right.get
|
||||||
|
|
||||||
|
val modules = r.configurations.flatMap(_.modules)
|
||||||
|
modules.map(_.module.name) should contain("main_2.12")
|
||||||
|
}
|
||||||
|
|
||||||
|
property("resolve with default resolvers") {
|
||||||
|
val dependencies =
|
||||||
|
Vector(("org.scala-sbt" % "compiler-interface" % "1.0.4" % "component").sources())
|
||||||
|
val lmEngine =
|
||||||
|
CoursierDependencyResolution(
|
||||||
|
CoursierConfiguration()
|
||||||
|
.withResolvers(Resolver.combineDefaultResolvers(Vector.empty))
|
||||||
|
)
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
resolution should be('right)
|
||||||
|
}
|
||||||
|
|
||||||
|
property("resolve plugin") {
|
||||||
|
val pluginAttributes = Map("scalaVersion" -> "2.12", "sbtVersion" -> "1.0")
|
||||||
|
val dependencies =
|
||||||
|
Vector(("org.xerial.sbt" % "sbt-sonatype" % "2.0").withExtraAttributes(pluginAttributes))
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
val r = resolution.right.get
|
||||||
|
|
||||||
|
val componentConfig = r.configurations.find(_.configuration == Compile.toConfigRef).get
|
||||||
|
componentConfig.modules.map(_.module.name) should have size 5
|
||||||
|
}
|
||||||
|
|
||||||
|
property("strip e: prefix from plugin attributes") {
|
||||||
|
val pluginAttributes = Map("e:scalaVersion" -> "2.12", "e:sbtVersion" -> "1.0")
|
||||||
|
val dependencies =
|
||||||
|
Vector(("org.xerial.sbt" % "sbt-sonatype" % "2.0").withExtraAttributes(pluginAttributes))
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
resolution should be('right)
|
||||||
|
}
|
||||||
|
|
||||||
|
property("resolve plugins hosted on repo.typesafe.com") {
|
||||||
|
val pluginAttributes = Map("e:scalaVersion" -> "2.12", "e:sbtVersion" -> "1.0")
|
||||||
|
val dependencies =
|
||||||
|
Vector(("com.typesafe.sbt" % "sbt-git" % "0.9.3").withExtraAttributes(pluginAttributes))
|
||||||
|
val coursierModule = module(lmEngine, stubModule, dependencies, Some("2.12.4"))
|
||||||
|
val resolution =
|
||||||
|
lmEngine.update(coursierModule, UpdateConfiguration(), UnresolvedWarningConfiguration(), log)
|
||||||
|
|
||||||
|
resolution should be('right)
|
||||||
|
}
|
||||||
|
|
||||||
|
property("reorder fast and slow resolvers") {
|
||||||
|
val resolvers = Vector(
|
||||||
|
JavaNet2Repository,
|
||||||
|
Resolver.sbtPluginRepo("releases"),
|
||||||
|
DefaultMavenRepository
|
||||||
|
)
|
||||||
|
val engine = new CoursierDependencyResolution(CoursierConfiguration().withResolvers(resolvers))
|
||||||
|
engine.resolvers.last.name should be("sbt-plugin-releases")
|
||||||
|
engine.resolvers should have size resolvers.length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import java.io.File
|
||||||
|
|
||||||
import coursier.{Artifact, FileError}
|
import coursier.{Artifact, FileError}
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import coursier.sbtcoursier.Structure._
|
import coursier.sbtcoursier.Structure._
|
||||||
import sbt.librarymanagement.{Artifact => _, Configuration => _, _}
|
import sbt.librarymanagement.{Artifact => _, Configuration => _, _}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.io.OutputStreamWriter
|
||||||
|
|
||||||
import coursier.{Cache, CachePolicy, TermDisplay}
|
import coursier.{Cache, CachePolicy, TermDisplay}
|
||||||
import coursier.core.{Configuration, ResolutionProcess}
|
import coursier.core.{Configuration, ResolutionProcess}
|
||||||
|
import coursier.lmcoursier.SbtCoursierCache
|
||||||
import sbt.librarymanagement.{Configuration => _, Resolver => _, _}
|
import sbt.librarymanagement.{Configuration => _, Resolver => _, _}
|
||||||
import sbt.{Cache => _, Configuration => _, _}
|
import sbt.{Cache => _, Configuration => _, _}
|
||||||
import sbt.Keys._
|
import sbt.Keys._
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.sbtcoursier
|
||||||
|
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import coursier.util.Print.Colors
|
import coursier.util.Print.Colors
|
||||||
import coursier.util.{Parse, Print}
|
import coursier.util.{Parse, Print}
|
||||||
|
|
@ -33,44 +34,41 @@ object DisplayTasks {
|
||||||
proj.copy(publications = publications)
|
proj.copy(publications = publications)
|
||||||
}
|
}
|
||||||
|
|
||||||
Def.taskDyn {
|
val resolutionsTask =
|
||||||
|
if (sbtClassifiers)
|
||||||
|
Def.task {
|
||||||
|
val currentProject = currentProjectTask.value
|
||||||
|
val classifiersRes = coursierSbtClassifiersResolution.value
|
||||||
|
Map(currentProject.configurations.keySet -> classifiersRes)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Def.task(coursierResolutions.value)
|
||||||
|
|
||||||
|
Def.task {
|
||||||
|
|
||||||
|
val currentProject = currentProjectTask.value
|
||||||
|
|
||||||
val config = Configuration(configuration.value.name)
|
val config = Configuration(configuration.value.name)
|
||||||
val configs = coursierConfigurations.value
|
val configs = coursierConfigurations.value
|
||||||
|
|
||||||
val includedConfigs = configs.getOrElse(config, Set.empty) + config
|
val includedConfigs = configs.getOrElse(config, Set.empty) + config
|
||||||
|
|
||||||
Def.taskDyn {
|
val resolutions = resolutionsTask.value
|
||||||
val currentProject = currentProjectTask.value
|
|
||||||
|
|
||||||
val resolutionsTask =
|
for {
|
||||||
if (sbtClassifiers)
|
(subGraphConfigs, res) <- resolutions.toSeq
|
||||||
Def.task {
|
if subGraphConfigs.exists(includedConfigs)
|
||||||
val classifiersRes = coursierSbtClassifiersResolution.value
|
} yield {
|
||||||
Map(currentProject.configurations.keySet -> classifiersRes)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Def.task(coursierResolutions.value)
|
|
||||||
|
|
||||||
Def.task {
|
val dependencies0 = currentProject.dependencies.collect {
|
||||||
val resolutions = resolutionsTask.value
|
case (cfg, dep) if includedConfigs(cfg) && subGraphConfigs(cfg) => dep
|
||||||
|
}.sortBy { dep =>
|
||||||
for {
|
(dep.module.organization, dep.module.name, dep.version)
|
||||||
(subGraphConfigs, res) <- resolutions.toSeq
|
|
||||||
if subGraphConfigs.exists(includedConfigs)
|
|
||||||
} yield {
|
|
||||||
|
|
||||||
val dependencies0 = currentProject.dependencies.collect {
|
|
||||||
case (cfg, dep) if includedConfigs(cfg) && subGraphConfigs(cfg) => dep
|
|
||||||
}.sortBy { dep =>
|
|
||||||
(dep.module.organization, dep.module.name, dep.version)
|
|
||||||
}
|
|
||||||
|
|
||||||
val subRes = res.subset(dependencies0.toSet)
|
|
||||||
|
|
||||||
ResolutionResult(subGraphConfigs, subRes, dependencies0)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val subRes = res.subset(dependencies0.toSet)
|
||||||
|
|
||||||
|
ResolutionResult(subGraphConfigs, subRes, dependencies0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.net.URL
|
||||||
|
|
||||||
import coursier.ProjectCache
|
import coursier.ProjectCache
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import coursier.sbtcoursier.Structure._
|
import coursier.sbtcoursier.Structure._
|
||||||
import sbt.librarymanagement.{Configuration => _, _}
|
import sbt.librarymanagement.{Configuration => _, _}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.sbtcoursier
|
||||||
|
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import coursier.sbtcoursier.Structure._
|
import coursier.sbtcoursier.Structure._
|
||||||
import sbt.{Classpaths, Def}
|
import sbt.{Classpaths, Def}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import coursier.{Cache, ProjectCache}
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
import coursier.extra.Typelevel
|
import coursier.extra.Typelevel
|
||||||
import coursier.ivy.IvyRepository
|
import coursier.ivy.IvyRepository
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.maven.MavenRepository
|
import coursier.maven.MavenRepository
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import sbt.Def
|
import sbt.Def
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package coursier.sbtcoursier
|
package coursier.sbtcoursier
|
||||||
|
|
||||||
import coursier.core._
|
import coursier.core._
|
||||||
|
import coursier.lmcoursier._
|
||||||
import coursier.sbtcoursier.Keys._
|
import coursier.sbtcoursier.Keys._
|
||||||
import sbt.Def
|
import sbt.Def
|
||||||
import sbt.Keys._
|
import sbt.Keys._
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -3,6 +3,6 @@ package coursier
|
||||||
object Helper {
|
object Helper {
|
||||||
|
|
||||||
def checkEmpty(): Boolean =
|
def checkEmpty(): Boolean =
|
||||||
coursier.sbtcoursier.SbtCoursierCache.default.isEmpty
|
coursier.lmcoursier.SbtCoursierCache.default.isEmpty
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
||||||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.19")
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
addSbtPlugin {
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
"plugin.version",
|
"plugin.version",
|
||||||
throw new RuntimeException(
|
sys.error("plugin.version Java property not set")
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
"io.get-coursier" % name % version
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
val pluginVersion = sys.props.getOrElse(
|
|
||||||
"plugin.version",
|
|
||||||
throw new RuntimeException(
|
|
||||||
"""|The system property 'plugin.version' is not defined.
|
|
||||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
addSbtPlugin {
|
||||||
|
|
||||||
|
val name = sys.props.getOrElse(
|
||||||
|
"plugin.name",
|
||||||
|
sys.error("plugin.name Java property not set")
|
||||||
|
)
|
||||||
|
val version = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
sys.error("plugin.version Java property not set")
|
||||||
|
)
|
||||||
|
|
||||||
|
"io.get-coursier" % name % version
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue