mirror of https://github.com/sbt/sbt.git
Remove unused stuff
This commit is contained in:
parent
ff79cab75c
commit
ad11bd5f32
|
|
@ -7,7 +7,6 @@ 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,
|
||||
|
|
@ -17,20 +16,20 @@ final class CoursierConfiguration private (
|
|||
val interProjectDependencies: Vector[coursier.core.Project],
|
||||
val excludeDependencies: Vector[(String, String)]) extends Serializable {
|
||||
|
||||
private def this() = this(None, sbt.librarymanagement.Resolver.defaults, Vector.empty, true, 6, 100, None, None, Vector.empty, Vector.empty, Vector.empty)
|
||||
private def this() = this(None, sbt.librarymanagement.Resolver.defaults, true, 6, 100, None, None, Vector.empty, Vector.empty, 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) && (this.interProjectDependencies == x.interProjectDependencies) && (this.excludeDependencies == x.excludeDependencies)
|
||||
case x: CoursierConfiguration => (this.log == x.log) && (this.resolvers == x.resolvers) && (this.reorderResolvers == x.reorderResolvers) && (this.parallelDownloads == x.parallelDownloads) && (this.maxIterations == x.maxIterations) && (this.sbtScalaOrganization == x.sbtScalaOrganization) && (this.sbtScalaVersion == x.sbtScalaVersion) && (this.sbtScalaJars == x.sbtScalaJars) && (this.interProjectDependencies == x.interProjectDependencies) && (this.excludeDependencies == x.excludeDependencies)
|
||||
case _ => false
|
||||
}
|
||||
override def hashCode: Int = {
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "coursier.lmcoursier.CoursierConfiguration".##) + log.##) + resolvers.##) + otherResolvers.##) + reorderResolvers.##) + parallelDownloads.##) + maxIterations.##) + sbtScalaOrganization.##) + sbtScalaVersion.##) + sbtScalaJars.##) + interProjectDependencies.##) + excludeDependencies.##)
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "coursier.lmcoursier.CoursierConfiguration".##) + log.##) + resolvers.##) + reorderResolvers.##) + parallelDownloads.##) + maxIterations.##) + sbtScalaOrganization.##) + sbtScalaVersion.##) + sbtScalaJars.##) + interProjectDependencies.##) + excludeDependencies.##)
|
||||
}
|
||||
override def toString: String = {
|
||||
"CoursierConfiguration(" + log + ", " + resolvers + ", " + otherResolvers + ", " + reorderResolvers + ", " + parallelDownloads + ", " + maxIterations + ", " + sbtScalaOrganization + ", " + sbtScalaVersion + ", " + sbtScalaJars + ", " + interProjectDependencies + ", " + excludeDependencies + ")"
|
||||
"CoursierConfiguration(" + log + ", " + resolvers + ", " + reorderResolvers + ", " + parallelDownloads + ", " + maxIterations + ", " + sbtScalaOrganization + ", " + sbtScalaVersion + ", " + sbtScalaJars + ", " + interProjectDependencies + ", " + excludeDependencies + ")"
|
||||
}
|
||||
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, interProjectDependencies: Vector[coursier.core.Project] = interProjectDependencies, excludeDependencies: Vector[(String, String)] = excludeDependencies): CoursierConfiguration = {
|
||||
new CoursierConfiguration(log, resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
private[this] def copy(log: Option[xsbti.Logger] = log, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers, reorderResolvers: Boolean = reorderResolvers, parallelDownloads: Int = parallelDownloads, maxIterations: Int = maxIterations, sbtScalaOrganization: Option[String] = sbtScalaOrganization, sbtScalaVersion: Option[String] = sbtScalaVersion, sbtScalaJars: Vector[java.io.File] = sbtScalaJars, interProjectDependencies: Vector[coursier.core.Project] = interProjectDependencies, excludeDependencies: Vector[(String, String)] = excludeDependencies): CoursierConfiguration = {
|
||||
new CoursierConfiguration(log, resolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
}
|
||||
def withLog(log: Option[xsbti.Logger]): CoursierConfiguration = {
|
||||
copy(log = log)
|
||||
|
|
@ -41,9 +40,6 @@ final class CoursierConfiguration private (
|
|||
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)
|
||||
}
|
||||
|
|
@ -78,6 +74,6 @@ final class CoursierConfiguration private (
|
|||
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], interProjectDependencies: Vector[coursier.core.Project], excludeDependencies: Vector[(String, String)]): CoursierConfiguration = new CoursierConfiguration(log, resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
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], interProjectDependencies: Vector[coursier.core.Project], excludeDependencies: Vector[(String, String)]): CoursierConfiguration = new CoursierConfiguration(Option(log), resolvers, otherResolvers, reorderResolvers, parallelDownloads, maxIterations, Option(sbtScalaOrganization), Option(sbtScalaVersion), sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
def apply(log: Option[xsbti.Logger], resolvers: Vector[sbt.librarymanagement.Resolver], reorderResolvers: Boolean, parallelDownloads: Int, maxIterations: Int, sbtScalaOrganization: Option[String], sbtScalaVersion: Option[String], sbtScalaJars: Vector[java.io.File], interProjectDependencies: Vector[coursier.core.Project], excludeDependencies: Vector[(String, String)]): CoursierConfiguration = new CoursierConfiguration(log, resolvers, reorderResolvers, parallelDownloads, maxIterations, sbtScalaOrganization, sbtScalaVersion, sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
def apply(log: xsbti.Logger, resolvers: Vector[sbt.librarymanagement.Resolver], reorderResolvers: Boolean, parallelDownloads: Int, maxIterations: Int, sbtScalaOrganization: String, sbtScalaVersion: String, sbtScalaJars: Vector[java.io.File], interProjectDependencies: Vector[coursier.core.Project], excludeDependencies: Vector[(String, String)]): CoursierConfiguration = new CoursierConfiguration(Option(log), resolvers, reorderResolvers, parallelDownloads, maxIterations, Option(sbtScalaOrganization), Option(sbtScalaVersion), sbtScalaJars, interProjectDependencies, excludeDependencies)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,12 +19,6 @@
|
|||
"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",
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ object LmCoursierPlugin extends AutoPlugin {
|
|||
|
||||
private def mkCoursierConfiguration: Def.Initialize[Task[CoursierConfiguration]] =
|
||||
Def.task {
|
||||
val (rs, other) = (fullResolvers.value.toVector, otherResolvers.value.toVector)
|
||||
val rs = fullResolvers.value.toVector
|
||||
val interProjectDependencies = coursierInterProjectDependencies.value
|
||||
val excludeDeps = Inputs.exclusions(
|
||||
excludeDependencies.value,
|
||||
|
|
@ -41,10 +41,9 @@ object LmCoursierPlugin extends AutoPlugin {
|
|||
streams.value.log
|
||||
)
|
||||
val s = streams.value
|
||||
Classpaths.warnResolversConflict(rs ++: other, s.log)
|
||||
Classpaths.warnResolversConflict(rs, s.log)
|
||||
CoursierConfiguration()
|
||||
.withResolvers(rs)
|
||||
.withOtherResolvers(other)
|
||||
.withInterProjectDependencies(interProjectDependencies.toVector)
|
||||
.withExcludeDependencies(
|
||||
excludeDeps
|
||||
|
|
|
|||
Loading…
Reference in New Issue