mirror of https://github.com/sbt/sbt.git
commit
f1051771c7
|
|
@ -16,6 +16,7 @@ script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M
|
|||
scalafmt::test test:scalafmt::test sbt:scalafmt::test
|
||||
whitesourceCheckPolicies
|
||||
test
|
||||
packagedArtifacts # ensure that all artifacts for publish package without failure
|
||||
|
||||
env:
|
||||
global:
|
||||
|
|
|
|||
137
build.sbt
137
build.sbt
|
|
@ -1,5 +1,6 @@
|
|||
import Dependencies._
|
||||
import Path._
|
||||
import com.typesafe.tools.mima.core._, ProblemFilters._
|
||||
|
||||
def commonSettings: Seq[Setting[_]] = Def settings (
|
||||
scalaVersion := scala212,
|
||||
|
|
@ -105,14 +106,94 @@ lazy val lmCore = (project in file("core"))
|
|||
(((srcs --- sdirs --- base) pair (relativeTo(sdirs) | relativeTo(base) | flat)) toSeq)
|
||||
},
|
||||
mimaSettings,
|
||||
mimaBinaryIssueFilters ++= {
|
||||
import com.typesafe.tools.mima.core._, ProblemFilters._
|
||||
Seq(
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.this"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.copy"),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.EvictionWarningOptions.copy$default$7")
|
||||
)
|
||||
}
|
||||
mimaBinaryIssueFilters ++= Seq(
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.this"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.copy"),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.EvictionWarningOptions.copy$default$7"),
|
||||
|
||||
// internal class moved
|
||||
exclude[MissingClassProblem]("sbt.internal.librarymanagement.InlineConfigurationFunctions"),
|
||||
// dropped internal class parent (InlineConfigurationFunctions)
|
||||
exclude[MissingTypesProblem]("sbt.librarymanagement.ModuleDescriptorConfiguration$"),
|
||||
|
||||
// Configuration's copy method was never meant to be public
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Configuration.copy"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Configuration.copy$default$*"),
|
||||
|
||||
// the data type copy methods were never meant to be public
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.copy"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.copy$default$*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.copy"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.copy$default$*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.copy"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.copy$default$*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.copy"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.copy$default$*"),
|
||||
|
||||
// these abstract classes are private[librarymanagement] so it's fine if they have more methods
|
||||
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.*"),
|
||||
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.*"),
|
||||
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.*"),
|
||||
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.*"),
|
||||
|
||||
// these abstract classes are private[librarymanagement] so they can lose these abstract methods
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.type"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.url"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.checksum"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.name"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.configurations"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.classifier"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.extension"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.types"),
|
||||
|
||||
// contraband issue
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ConfigurationReportLite.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.UpdateReportLite.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Artifact.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilter.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Binary.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Caller.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ChainedResolver.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Checksum.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConfigRef.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConfigurationReport.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConflictManager.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Constant.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Developer.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Disabled.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.FileConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.FileRepository.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Full.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.GetClassifiersConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.GetClassifiersModule.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.InclExclRule.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.IvyFileConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.KeyFileAuthentication.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MakePomConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MavenCache.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MavenRepo.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleDescriptorConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleID.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleInfo.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReport.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.OrganizationArtifactReport.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PasswordAuthentication.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Patch.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Patterns.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PomConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PublishConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.RetrieveConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScalaModuleInfo.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScmInfo.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SftpRepository.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SshConnection.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SshRepository.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateReport.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateStats.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.URLRepository.copy*"),
|
||||
),
|
||||
)
|
||||
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache)
|
||||
|
||||
|
|
@ -142,24 +223,30 @@ lazy val lmIvy = (project in file("ivy"))
|
|||
scalacOptions in (Compile, console) --=
|
||||
Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint"),
|
||||
mimaSettings,
|
||||
mimaBinaryIssueFilters ++= {
|
||||
import com.typesafe.tools.mima.core._, ProblemFilters._
|
||||
Seq(
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[IncompatibleMethTypeProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.checkStatusCode"),
|
||||
mimaBinaryIssueFilters ++= Seq(
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[IncompatibleMethTypeProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.checkStatusCode"),
|
||||
|
||||
// sbt.internal methods that changed type signatures and aren't used elsewhere in production code
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt#ParallelCachedResolutionResolveEngine.mergeErrors"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt.cleanCachedResolutionCache"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvyRetrieve.artifacts"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvyScalaUtil.checkModule"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptor"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptors"),
|
||||
exclude[ReversedMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors")
|
||||
)
|
||||
},
|
||||
// sbt.internal methods that changed type signatures and aren't used elsewhere in production code
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt#ParallelCachedResolutionResolveEngine.mergeErrors"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt.cleanCachedResolutionCache"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvyRetrieve.artifacts"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvyScalaUtil.checkModule"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptor"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptors"),
|
||||
exclude[ReversedMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors"),
|
||||
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[IncompatibleMethTypeProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.checkStatusCode"),
|
||||
|
||||
// contraband issue
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.ExternalIvyConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.InlineIvyConfiguration.copy*"),
|
||||
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.IvyPaths.copy*"),
|
||||
),
|
||||
)
|
||||
|
||||
def customCommands: Seq[Setting[_]] = Seq(
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class ConfigurationReportLite private (
|
|||
override def toString: String = {
|
||||
"ConfigurationReportLite(" + configuration + ", " + details + ")"
|
||||
}
|
||||
protected[this] def copy(configuration: String = configuration, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReportLite = {
|
||||
private[this] def copy(configuration: String = configuration, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReportLite = {
|
||||
new ConfigurationReportLite(configuration, details)
|
||||
}
|
||||
def withConfiguration(configuration: String): ConfigurationReportLite = {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ final class UpdateReportLite private (
|
|||
override def toString: String = {
|
||||
"UpdateReportLite(" + configurations + ")"
|
||||
}
|
||||
protected[this] def copy(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite] = configurations): UpdateReportLite = {
|
||||
private[this] def copy(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite] = configurations): UpdateReportLite = {
|
||||
new UpdateReportLite(configurations)
|
||||
}
|
||||
def withConfigurations(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite]): UpdateReportLite = {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class Artifact private (
|
|||
override def toString: String = {
|
||||
"Artifact(" + name + ", " + `type` + ", " + extension + ", " + classifier + ", " + configurations + ", " + url + ", " + extraAttributes + ", " + checksum + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, `type`: String = `type`, extension: String = extension, classifier: Option[String] = classifier, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, url: Option[java.net.URL] = url, extraAttributes: Map[String, String] = extraAttributes, checksum: Option[sbt.librarymanagement.Checksum] = checksum): Artifact = {
|
||||
private[this] def copy(name: String = name, `type`: String = `type`, extension: String = extension, classifier: Option[String] = classifier, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, url: Option[java.net.URL] = url, extraAttributes: Map[String, String] = extraAttributes, checksum: Option[sbt.librarymanagement.Checksum] = checksum): Artifact = {
|
||||
new Artifact(name, `type`, extension, classifier, configurations, url, extraAttributes, checksum)
|
||||
}
|
||||
def withName(name: String): Artifact = {
|
||||
|
|
@ -56,6 +56,6 @@ final class Artifact private (
|
|||
}
|
||||
object Artifact extends sbt.librarymanagement.ArtifactFunctions {
|
||||
|
||||
def apply(name: String): Artifact = new Artifact(name, Artifact.DefaultType, Artifact.DefaultExtension, None, Vector.empty, None, Map.empty, None)
|
||||
def apply(name: String): Artifact = new Artifact(name)
|
||||
def apply(name: String, `type`: String, extension: String, classifier: Option[String], configurations: Vector[sbt.librarymanagement.ConfigRef], url: Option[java.net.URL], extraAttributes: Map[String, String], checksum: Option[sbt.librarymanagement.Checksum]): Artifact = new Artifact(name, `type`, extension, classifier, configurations, url, extraAttributes, checksum)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ final class ArtifactTypeFilter private (
|
|||
override def toString: String = {
|
||||
"ArtifactTypeFilter(" + types + ", " + inverted + ")"
|
||||
}
|
||||
protected[this] def copy(types: Set[String] = types, inverted: Boolean = inverted): ArtifactTypeFilter = {
|
||||
private[this] def copy(types: Set[String] = types, inverted: Boolean = inverted): ArtifactTypeFilter = {
|
||||
new ArtifactTypeFilter(types, inverted)
|
||||
}
|
||||
def withTypes(types: Set[String]): ArtifactTypeFilter = {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class Binary private (
|
|||
override def toString: String = {
|
||||
"Binary(" + prefix + ", " + suffix + ")"
|
||||
}
|
||||
protected[this] def copy(prefix: String = prefix, suffix: String = suffix): Binary = {
|
||||
private[this] def copy(prefix: String = prefix, suffix: String = suffix): Binary = {
|
||||
new Binary(prefix, suffix)
|
||||
}
|
||||
def withPrefix(prefix: String): Binary = {
|
||||
|
|
@ -38,6 +38,6 @@ final class Binary private (
|
|||
}
|
||||
object Binary {
|
||||
|
||||
def apply(): Binary = new Binary("", "")
|
||||
def apply(): Binary = new Binary()
|
||||
def apply(prefix: String, suffix: String): Binary = new Binary(prefix, suffix)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ final class Caller private (
|
|||
override def toString: String = {
|
||||
s"$caller"
|
||||
}
|
||||
protected[this] def copy(caller: sbt.librarymanagement.ModuleID = caller, callerConfigurations: Vector[sbt.librarymanagement.ConfigRef] = callerConfigurations, callerExtraAttributes: Map[String, String] = callerExtraAttributes, isForceDependency: Boolean = isForceDependency, isChangingDependency: Boolean = isChangingDependency, isTransitiveDependency: Boolean = isTransitiveDependency, isDirectlyForceDependency: Boolean = isDirectlyForceDependency): Caller = {
|
||||
private[this] def copy(caller: sbt.librarymanagement.ModuleID = caller, callerConfigurations: Vector[sbt.librarymanagement.ConfigRef] = callerConfigurations, callerExtraAttributes: Map[String, String] = callerExtraAttributes, isForceDependency: Boolean = isForceDependency, isChangingDependency: Boolean = isChangingDependency, isTransitiveDependency: Boolean = isTransitiveDependency, isDirectlyForceDependency: Boolean = isDirectlyForceDependency): Caller = {
|
||||
new Caller(caller, callerConfigurations, callerExtraAttributes, isForceDependency, isChangingDependency, isTransitiveDependency, isDirectlyForceDependency)
|
||||
}
|
||||
def withCaller(caller: sbt.librarymanagement.ModuleID): Caller = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class ChainedResolver private (
|
|||
override def toString: String = {
|
||||
"ChainedResolver(" + name + ", " + resolvers + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers): ChainedResolver = {
|
||||
private[this] def copy(name: String = name, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers): ChainedResolver = {
|
||||
new ChainedResolver(name, resolvers)
|
||||
}
|
||||
def withName(name: String): ChainedResolver = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class Checksum private (
|
|||
override def toString: String = {
|
||||
"Checksum(" + digest + ", " + `type` + ")"
|
||||
}
|
||||
protected[this] def copy(digest: String = digest, `type`: String = `type`): Checksum = {
|
||||
private[this] def copy(digest: String = digest, `type`: String = `type`): Checksum = {
|
||||
new Checksum(digest, `type`)
|
||||
}
|
||||
def withDigest(digest: String): Checksum = {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ final class ConfigRef private (
|
|||
override def toString: String = {
|
||||
name
|
||||
}
|
||||
protected[this] def copy(name: String = name): ConfigRef = {
|
||||
private[this] def copy(name: String = name): ConfigRef = {
|
||||
new ConfigRef(name)
|
||||
}
|
||||
def withName(name: String): ConfigRef = {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ final class ConfigurationReport private (
|
|||
(if (details.isEmpty) modules.mkString + details.flatMap(_.modules).filter(_.evicted).map("\t\t(EVICTED) " + _ + "\n").mkString
|
||||
else details.mkString)
|
||||
}
|
||||
protected[this] def copy(configuration: sbt.librarymanagement.ConfigRef = configuration, modules: Vector[sbt.librarymanagement.ModuleReport] = modules, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReport = {
|
||||
private[this] def copy(configuration: sbt.librarymanagement.ConfigRef = configuration, modules: Vector[sbt.librarymanagement.ModuleReport] = modules, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReport = {
|
||||
new ConfigurationReport(configuration, modules, details)
|
||||
}
|
||||
def withConfiguration(configuration: sbt.librarymanagement.ConfigRef): ConfigurationReport = {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class ConflictManager private (
|
|||
override def toString: String = {
|
||||
"ConflictManager(" + name + ", " + organization + ", " + module + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, organization: String = organization, module: String = module): ConflictManager = {
|
||||
private[this] def copy(name: String = name, organization: String = organization, module: String = module): ConflictManager = {
|
||||
new ConflictManager(name, organization, module)
|
||||
}
|
||||
def withName(name: String): ConflictManager = {
|
||||
|
|
@ -37,6 +37,6 @@ final class ConflictManager private (
|
|||
}
|
||||
object ConflictManager extends sbt.librarymanagement.ConflictManagerFunctions {
|
||||
|
||||
def apply(name: String): ConflictManager = new ConflictManager(name, "*", "*")
|
||||
def apply(name: String): ConflictManager = new ConflictManager(name)
|
||||
def apply(name: String, organization: String, module: String): ConflictManager = new ConflictManager(name, organization, module)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class Constant private (
|
|||
override def toString: String = {
|
||||
"Constant(" + value + ")"
|
||||
}
|
||||
protected[this] def copy(value: String = value): Constant = {
|
||||
private[this] def copy(value: String = value): Constant = {
|
||||
new Constant(value)
|
||||
}
|
||||
def withValue(value: String): Constant = {
|
||||
|
|
@ -29,6 +29,6 @@ final class Constant private (
|
|||
}
|
||||
object Constant {
|
||||
|
||||
def apply(): Constant = new Constant("")
|
||||
def apply(): Constant = new Constant()
|
||||
def apply(value: String): Constant = new Constant(value)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class Developer private (
|
|||
override def toString: String = {
|
||||
"Developer(" + id + ", " + name + ", " + email + ", " + url + ")"
|
||||
}
|
||||
protected[this] def copy(id: String = id, name: String = name, email: String = email, url: java.net.URL = url): Developer = {
|
||||
private[this] def copy(id: String = id, name: String = name, email: String = email, url: java.net.URL = url): Developer = {
|
||||
new Developer(id, name, email, url)
|
||||
}
|
||||
def withId(id: String): Developer = {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ override def hashCode: Int = {
|
|||
override def toString: String = {
|
||||
"Disabled()"
|
||||
}
|
||||
protected[this] def copy(): Disabled = {
|
||||
private[this] def copy(): Disabled = {
|
||||
new Disabled()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ final class FileConfiguration private (
|
|||
override def toString: String = {
|
||||
"FileConfiguration(" + isLocal + ", " + isTransactional + ")"
|
||||
}
|
||||
protected[this] def copy(isLocal: Boolean = isLocal, isTransactional: Option[Boolean] = isTransactional): FileConfiguration = {
|
||||
private[this] def copy(isLocal: Boolean = isLocal, isTransactional: Option[Boolean] = isTransactional): FileConfiguration = {
|
||||
new FileConfiguration(isLocal, isTransactional)
|
||||
}
|
||||
def withIsLocal(isLocal: Boolean): FileConfiguration = {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final class FileRepository private (
|
|||
override def toString: String = {
|
||||
"FileRepository(" + name + ", " + patterns + ", " + configuration + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, configuration: sbt.librarymanagement.FileConfiguration = configuration): FileRepository = {
|
||||
private[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, configuration: sbt.librarymanagement.FileConfiguration = configuration): FileRepository = {
|
||||
new FileRepository(name, patterns, configuration)
|
||||
}
|
||||
def withName(name: String): FileRepository = {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class Full private (
|
|||
override def toString: String = {
|
||||
"Full(" + prefix + ", " + suffix + ")"
|
||||
}
|
||||
protected[this] def copy(prefix: String = prefix, suffix: String = suffix): Full = {
|
||||
private[this] def copy(prefix: String = prefix, suffix: String = suffix): Full = {
|
||||
new Full(prefix, suffix)
|
||||
}
|
||||
def withPrefix(prefix: String): Full = {
|
||||
|
|
@ -38,6 +38,6 @@ final class Full private (
|
|||
}
|
||||
object Full {
|
||||
|
||||
def apply(): Full = new Full("", "")
|
||||
def apply(): Full = new Full()
|
||||
def apply(prefix: String, suffix: String): Full = new Full(prefix, suffix)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final class GetClassifiersConfiguration private (
|
|||
override def toString: String = {
|
||||
"GetClassifiersConfiguration(" + module + ", " + excludes + ", " + updateConfiguration + ", " + sourceArtifactTypes + ", " + docArtifactTypes + ")"
|
||||
}
|
||||
protected[this] def copy(module: sbt.librarymanagement.GetClassifiersModule = module, excludes: Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]] = excludes, updateConfiguration: sbt.librarymanagement.UpdateConfiguration = updateConfiguration, sourceArtifactTypes: Vector[String] = sourceArtifactTypes, docArtifactTypes: Vector[String] = docArtifactTypes): GetClassifiersConfiguration = {
|
||||
private[this] def copy(module: sbt.librarymanagement.GetClassifiersModule = module, excludes: Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]] = excludes, updateConfiguration: sbt.librarymanagement.UpdateConfiguration = updateConfiguration, sourceArtifactTypes: Vector[String] = sourceArtifactTypes, docArtifactTypes: Vector[String] = docArtifactTypes): GetClassifiersConfiguration = {
|
||||
new GetClassifiersConfiguration(module, excludes, updateConfiguration, sourceArtifactTypes, docArtifactTypes)
|
||||
}
|
||||
def withModule(module: sbt.librarymanagement.GetClassifiersModule): GetClassifiersConfiguration = {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final class GetClassifiersModule private (
|
|||
override def toString: String = {
|
||||
"GetClassifiersModule(" + id + ", " + scalaModuleInfo + ", " + dependencies + ", " + configurations + ", " + classifiers + ")"
|
||||
}
|
||||
protected[this] def copy(id: sbt.librarymanagement.ModuleID = id, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID] = dependencies, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, classifiers: Vector[String] = classifiers): GetClassifiersModule = {
|
||||
private[this] def copy(id: sbt.librarymanagement.ModuleID = id, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID] = dependencies, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, classifiers: Vector[String] = classifiers): GetClassifiersModule = {
|
||||
new GetClassifiersModule(id, scalaModuleInfo, dependencies, configurations, classifiers)
|
||||
}
|
||||
def withId(id: sbt.librarymanagement.ModuleID): GetClassifiersModule = {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ final class InclExclRule private (
|
|||
override def toString: String = {
|
||||
"InclExclRule(" + organization + ", " + name + ", " + artifact + ", " + configurations + ", " + crossVersion + ")"
|
||||
}
|
||||
protected[this] def copy(organization: String = organization, name: String = name, artifact: String = artifact, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, crossVersion: sbt.librarymanagement.CrossVersion = crossVersion): InclExclRule = {
|
||||
private[this] def copy(organization: String = organization, name: String = name, artifact: String = artifact, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, crossVersion: sbt.librarymanagement.CrossVersion = crossVersion): InclExclRule = {
|
||||
new InclExclRule(organization, name, artifact, configurations, crossVersion)
|
||||
}
|
||||
def withOrganization(organization: String): InclExclRule = {
|
||||
|
|
@ -53,6 +53,6 @@ final class InclExclRule private (
|
|||
}
|
||||
object InclExclRule extends sbt.librarymanagement.InclExclRuleFunctions {
|
||||
|
||||
def apply(): InclExclRule = new InclExclRule("*", "*", "*", Vector.empty, sbt.librarymanagement.Disabled())
|
||||
def apply(): InclExclRule = new InclExclRule()
|
||||
def apply(organization: String, name: String, artifact: String, configurations: Vector[sbt.librarymanagement.ConfigRef], crossVersion: sbt.librarymanagement.CrossVersion): InclExclRule = new InclExclRule(organization, name, artifact, configurations, crossVersion)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class IvyFileConfiguration private (
|
|||
override def toString: String = {
|
||||
"IvyFileConfiguration(" + validate + ", " + scalaModuleInfo + ", " + file + ", " + autoScalaTools + ")"
|
||||
}
|
||||
protected[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, file: java.io.File = file, autoScalaTools: Boolean = autoScalaTools): IvyFileConfiguration = {
|
||||
private[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, file: java.io.File = file, autoScalaTools: Boolean = autoScalaTools): IvyFileConfiguration = {
|
||||
new IvyFileConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
|
||||
}
|
||||
def withValidate(validate: Boolean): IvyFileConfiguration = {
|
||||
|
|
@ -43,7 +43,7 @@ final class IvyFileConfiguration private (
|
|||
}
|
||||
object IvyFileConfiguration {
|
||||
|
||||
def apply(file: java.io.File, autoScalaTools: Boolean): IvyFileConfiguration = new IvyFileConfiguration(false, None, file, autoScalaTools)
|
||||
def apply(file: java.io.File, autoScalaTools: Boolean): IvyFileConfiguration = new IvyFileConfiguration(file, autoScalaTools)
|
||||
def apply(validate: Boolean, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo], file: java.io.File, autoScalaTools: Boolean): IvyFileConfiguration = new IvyFileConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
|
||||
def apply(validate: Boolean, scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo, file: java.io.File, autoScalaTools: Boolean): IvyFileConfiguration = new IvyFileConfiguration(validate, Option(scalaModuleInfo), file, autoScalaTools)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ final class KeyFileAuthentication private (
|
|||
override def toString: String = {
|
||||
"KeyFileAuthentication(" + user + ", " + keyfile + ", " + password + ")"
|
||||
}
|
||||
protected[this] def copy(user: String = user, keyfile: java.io.File = keyfile, password: Option[String] = password): KeyFileAuthentication = {
|
||||
private[this] def copy(user: String = user, keyfile: java.io.File = keyfile, password: Option[String] = password): KeyFileAuthentication = {
|
||||
new KeyFileAuthentication(user, keyfile, password)
|
||||
}
|
||||
def withUser(user: String): KeyFileAuthentication = {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
/**
|
||||
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
|
||||
*/
|
||||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
final class MakePomConfiguration private (
|
||||
val file: Option[java.io.File],
|
||||
val moduleInfo: Option[sbt.librarymanagement.ModuleInfo],
|
||||
val configurations: Option[scala.Vector[sbt.librarymanagement.Configuration]],
|
||||
val extra: Option[scala.xml.NodeSeq],
|
||||
val process: scala.Function1[scala.xml.Node, scala.xml.Node],
|
||||
val filterRepositories: scala.Function1[sbt.librarymanagement.MavenRepository, Boolean],
|
||||
val allRepositories: Boolean,
|
||||
val includeTypes: Set[String]) extends Serializable {
|
||||
|
||||
|
||||
|
||||
override def equals(o: Any): Boolean = o match {
|
||||
case x: MakePomConfiguration => (this.file == x.file) && (this.moduleInfo == x.moduleInfo) && (this.configurations == x.configurations) && (this.extra == x.extra) && (this.process == x.process) && (this.filterRepositories == x.filterRepositories) && (this.allRepositories == x.allRepositories) && (this.includeTypes == x.includeTypes)
|
||||
case _ => false
|
||||
}
|
||||
override def hashCode: Int = {
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "sbt.librarymanagement.MakePomConfiguration".##) + file.##) + moduleInfo.##) + configurations.##) + extra.##) + process.##) + filterRepositories.##) + allRepositories.##) + includeTypes.##)
|
||||
}
|
||||
override def toString: String = {
|
||||
"MakePomConfiguration(" + file + ", " + moduleInfo + ", " + configurations + ", " + extra + ", " + process + ", " + filterRepositories + ", " + allRepositories + ", " + includeTypes + ")"
|
||||
}
|
||||
private[this] def copy(file: Option[java.io.File] = file, moduleInfo: Option[sbt.librarymanagement.ModuleInfo] = moduleInfo, configurations: Option[scala.Vector[sbt.librarymanagement.Configuration]] = configurations, extra: Option[scala.xml.NodeSeq] = extra, process: scala.Function1[scala.xml.Node, scala.xml.Node] = process, filterRepositories: scala.Function1[sbt.librarymanagement.MavenRepository, Boolean] = filterRepositories, allRepositories: Boolean = allRepositories, includeTypes: Set[String] = includeTypes): MakePomConfiguration = {
|
||||
new MakePomConfiguration(file, moduleInfo, configurations, extra, process, filterRepositories, allRepositories, includeTypes)
|
||||
}
|
||||
def withFile(file: Option[java.io.File]): MakePomConfiguration = {
|
||||
copy(file = file)
|
||||
}
|
||||
def withFile(file: java.io.File): MakePomConfiguration = {
|
||||
copy(file = Option(file))
|
||||
}
|
||||
def withModuleInfo(moduleInfo: Option[sbt.librarymanagement.ModuleInfo]): MakePomConfiguration = {
|
||||
copy(moduleInfo = moduleInfo)
|
||||
}
|
||||
def withModuleInfo(moduleInfo: sbt.librarymanagement.ModuleInfo): MakePomConfiguration = {
|
||||
copy(moduleInfo = Option(moduleInfo))
|
||||
}
|
||||
def withConfigurations(configurations: Option[scala.Vector[sbt.librarymanagement.Configuration]]): MakePomConfiguration = {
|
||||
copy(configurations = configurations)
|
||||
}
|
||||
def withConfigurations(configurations: scala.Vector[sbt.librarymanagement.Configuration]): MakePomConfiguration = {
|
||||
copy(configurations = Option(configurations))
|
||||
}
|
||||
def withExtra(extra: Option[scala.xml.NodeSeq]): MakePomConfiguration = {
|
||||
copy(extra = extra)
|
||||
}
|
||||
def withExtra(extra: scala.xml.NodeSeq): MakePomConfiguration = {
|
||||
copy(extra = Option(extra))
|
||||
}
|
||||
def withProcess(process: scala.Function1[scala.xml.Node, scala.xml.Node]): MakePomConfiguration = {
|
||||
copy(process = process)
|
||||
}
|
||||
def withFilterRepositories(filterRepositories: scala.Function1[sbt.librarymanagement.MavenRepository, Boolean]): MakePomConfiguration = {
|
||||
copy(filterRepositories = filterRepositories)
|
||||
}
|
||||
def withAllRepositories(allRepositories: Boolean): MakePomConfiguration = {
|
||||
copy(allRepositories = allRepositories)
|
||||
}
|
||||
def withIncludeTypes(includeTypes: Set[String]): MakePomConfiguration = {
|
||||
copy(includeTypes = includeTypes)
|
||||
}
|
||||
}
|
||||
object MakePomConfiguration extends sbt.librarymanagement.MakePomConfigurationFunctions {
|
||||
|
||||
def apply(file: Option[java.io.File], moduleInfo: Option[sbt.librarymanagement.ModuleInfo], configurations: Option[scala.Vector[sbt.librarymanagement.Configuration]], extra: Option[scala.xml.NodeSeq], process: scala.Function1[scala.xml.Node, scala.xml.Node], filterRepositories: scala.Function1[sbt.librarymanagement.MavenRepository, Boolean], allRepositories: Boolean, includeTypes: Set[String]): MakePomConfiguration = new MakePomConfiguration(file, moduleInfo, configurations, extra, process, filterRepositories, allRepositories, includeTypes)
|
||||
def apply(file: java.io.File, moduleInfo: sbt.librarymanagement.ModuleInfo, configurations: scala.Vector[sbt.librarymanagement.Configuration], extra: scala.xml.NodeSeq, process: scala.Function1[scala.xml.Node, scala.xml.Node], filterRepositories: scala.Function1[sbt.librarymanagement.MavenRepository, Boolean], allRepositories: Boolean, includeTypes: Set[String]): MakePomConfiguration = new MakePomConfiguration(Option(file), Option(moduleInfo), Option(configurations), Option(extra), process, filterRepositories, allRepositories, includeTypes)
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ final class MavenCache private (
|
|||
override def toString: String = {
|
||||
s"cache:$name: ${rootFile.getAbsolutePath}"
|
||||
}
|
||||
protected[this] def copy(name: String = name, root: String = root, localIfFile: Boolean = localIfFile, rootFile: java.io.File = rootFile): MavenCache = {
|
||||
private[this] def copy(name: String = name, root: String = root, localIfFile: Boolean = localIfFile, rootFile: java.io.File = rootFile): MavenCache = {
|
||||
new MavenCache(name, root, localIfFile, rootFile)
|
||||
}
|
||||
def withName(name: String): MavenCache = {
|
||||
|
|
@ -45,6 +45,6 @@ final class MavenCache private (
|
|||
}
|
||||
object MavenCache {
|
||||
def apply(name: String, rootFile: java.io.File): MavenCache = new MavenCache(name, rootFile)
|
||||
def apply(name: String, root: String, rootFile: java.io.File): MavenCache = new MavenCache(name, root, true, rootFile)
|
||||
def apply(name: String, root: String, rootFile: java.io.File): MavenCache = new MavenCache(name, root, rootFile)
|
||||
def apply(name: String, root: String, localIfFile: Boolean, rootFile: java.io.File): MavenCache = new MavenCache(name, root, localIfFile, rootFile)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ final class MavenRepo private (
|
|||
override def toString: String = {
|
||||
s"$name: $root"
|
||||
}
|
||||
protected[this] def copy(name: String = name, root: String = root, localIfFile: Boolean = localIfFile): MavenRepo = {
|
||||
private[this] def copy(name: String = name, root: String = root, localIfFile: Boolean = localIfFile): MavenRepo = {
|
||||
new MavenRepo(name, root, localIfFile)
|
||||
}
|
||||
def withName(name: String): MavenRepo = {
|
||||
|
|
@ -36,6 +36,6 @@ final class MavenRepo private (
|
|||
}
|
||||
object MavenRepo {
|
||||
|
||||
def apply(name: String, root: String): MavenRepo = new MavenRepo(name, root, true)
|
||||
def apply(name: String, root: String): MavenRepo = new MavenRepo(name, root)
|
||||
def apply(name: String, root: String, localIfFile: Boolean): MavenRepo = new MavenRepo(name, root, localIfFile)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class ModuleConfiguration private (
|
|||
override def toString: String = {
|
||||
"ModuleConfiguration(" + organization + ", " + name + ", " + revision + ", " + resolver + ")"
|
||||
}
|
||||
protected[this] def copy(organization: String = organization, name: String = name, revision: String = revision, resolver: sbt.librarymanagement.Resolver = resolver): ModuleConfiguration = {
|
||||
private[this] def copy(organization: String = organization, name: String = name, revision: String = revision, resolver: sbt.librarymanagement.Resolver = resolver): ModuleConfiguration = {
|
||||
new ModuleConfiguration(organization, name, revision, resolver)
|
||||
}
|
||||
def withOrganization(organization: String): ModuleConfiguration = {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ final class ModuleDescriptorConfiguration private (
|
|||
override def toString: String = {
|
||||
"ModuleDescriptorConfiguration(" + validate + ", " + scalaModuleInfo + ", " + module + ", " + moduleInfo + ", " + dependencies + ", " + overrides + ", " + excludes + ", " + ivyXML + ", " + configurations + ", " + defaultConfiguration + ", " + conflictManager + ")"
|
||||
}
|
||||
protected[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, module: sbt.librarymanagement.ModuleID = module, moduleInfo: sbt.librarymanagement.ModuleInfo = moduleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID] = dependencies, overrides: Vector[sbt.librarymanagement.ModuleID] = overrides, excludes: Vector[sbt.librarymanagement.InclExclRule] = excludes, ivyXML: scala.xml.NodeSeq = ivyXML, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, defaultConfiguration: Option[sbt.librarymanagement.Configuration] = defaultConfiguration, conflictManager: sbt.librarymanagement.ConflictManager = conflictManager): ModuleDescriptorConfiguration = {
|
||||
private[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, module: sbt.librarymanagement.ModuleID = module, moduleInfo: sbt.librarymanagement.ModuleInfo = moduleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID] = dependencies, overrides: Vector[sbt.librarymanagement.ModuleID] = overrides, excludes: Vector[sbt.librarymanagement.InclExclRule] = excludes, ivyXML: scala.xml.NodeSeq = ivyXML, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, defaultConfiguration: Option[sbt.librarymanagement.Configuration] = defaultConfiguration, conflictManager: sbt.librarymanagement.ConflictManager = conflictManager): ModuleDescriptorConfiguration = {
|
||||
new ModuleDescriptorConfiguration(validate, scalaModuleInfo, module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, defaultConfiguration, conflictManager)
|
||||
}
|
||||
def withValidate(validate: Boolean): ModuleDescriptorConfiguration = {
|
||||
|
|
@ -72,9 +72,9 @@ final class ModuleDescriptorConfiguration private (
|
|||
copy(conflictManager = conflictManager)
|
||||
}
|
||||
}
|
||||
object ModuleDescriptorConfiguration extends sbt.internal.librarymanagement.InlineConfigurationFunctions {
|
||||
object ModuleDescriptorConfiguration extends sbt.librarymanagement.InlineConfigurationFunctions {
|
||||
|
||||
def apply(module: sbt.librarymanagement.ModuleID, moduleInfo: sbt.librarymanagement.ModuleInfo): ModuleDescriptorConfiguration = new ModuleDescriptorConfiguration(false, None, module, moduleInfo, Vector.empty, Vector.empty, Vector.empty, scala.xml.NodeSeq.Empty, sbt.librarymanagement.Configurations.default, Option(sbt.librarymanagement.Configurations.Compile), sbt.librarymanagement.ConflictManager.default)
|
||||
def apply(module: sbt.librarymanagement.ModuleID, moduleInfo: sbt.librarymanagement.ModuleInfo): ModuleDescriptorConfiguration = new ModuleDescriptorConfiguration(module, moduleInfo)
|
||||
def apply(validate: Boolean, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo], module: sbt.librarymanagement.ModuleID, moduleInfo: sbt.librarymanagement.ModuleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID], overrides: Vector[sbt.librarymanagement.ModuleID], excludes: Vector[sbt.librarymanagement.InclExclRule], ivyXML: scala.xml.NodeSeq, configurations: Vector[sbt.librarymanagement.Configuration], defaultConfiguration: Option[sbt.librarymanagement.Configuration], conflictManager: sbt.librarymanagement.ConflictManager): ModuleDescriptorConfiguration = new ModuleDescriptorConfiguration(validate, scalaModuleInfo, module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, defaultConfiguration, conflictManager)
|
||||
def apply(validate: Boolean, scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo, module: sbt.librarymanagement.ModuleID, moduleInfo: sbt.librarymanagement.ModuleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID], overrides: Vector[sbt.librarymanagement.ModuleID], excludes: Vector[sbt.librarymanagement.InclExclRule], ivyXML: scala.xml.NodeSeq, configurations: Vector[sbt.librarymanagement.Configuration], defaultConfiguration: sbt.librarymanagement.Configuration, conflictManager: sbt.librarymanagement.ConflictManager): ModuleDescriptorConfiguration = new ModuleDescriptorConfiguration(validate, Option(scalaModuleInfo), module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, Option(defaultConfiguration), conflictManager)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ final class ModuleID private (
|
|||
override def toString: String = {
|
||||
this.toStringImpl
|
||||
}
|
||||
protected[this] def copy(organization: String = organization, name: String = name, revision: String = revision, configurations: Option[String] = configurations, isChanging: Boolean = isChanging, isTransitive: Boolean = isTransitive, isForce: Boolean = isForce, explicitArtifacts: Vector[sbt.librarymanagement.Artifact] = explicitArtifacts, inclusions: Vector[sbt.librarymanagement.InclExclRule] = inclusions, exclusions: Vector[sbt.librarymanagement.InclExclRule] = exclusions, extraAttributes: Map[String, String] = extraAttributes, crossVersion: sbt.librarymanagement.CrossVersion = crossVersion, branchName: Option[String] = branchName): ModuleID = {
|
||||
private[this] def copy(organization: String = organization, name: String = name, revision: String = revision, configurations: Option[String] = configurations, isChanging: Boolean = isChanging, isTransitive: Boolean = isTransitive, isForce: Boolean = isForce, explicitArtifacts: Vector[sbt.librarymanagement.Artifact] = explicitArtifacts, inclusions: Vector[sbt.librarymanagement.InclExclRule] = inclusions, exclusions: Vector[sbt.librarymanagement.InclExclRule] = exclusions, extraAttributes: Map[String, String] = extraAttributes, crossVersion: sbt.librarymanagement.CrossVersion = crossVersion, branchName: Option[String] = branchName): ModuleID = {
|
||||
new ModuleID(organization, name, revision, configurations, isChanging, isTransitive, isForce, explicitArtifacts, inclusions, exclusions, extraAttributes, crossVersion, branchName)
|
||||
}
|
||||
def withOrganization(organization: String): ModuleID = {
|
||||
|
|
@ -76,6 +76,6 @@ final class ModuleID private (
|
|||
}
|
||||
object ModuleID extends sbt.librarymanagement.ModuleIDFunctions {
|
||||
|
||||
def apply(organization: String, name: String, revision: String): ModuleID = new ModuleID(organization, name, revision, None, false, true, false, Vector.empty, Vector.empty, Vector.empty, Map.empty, sbt.librarymanagement.Disabled(), None)
|
||||
def apply(organization: String, name: String, revision: String): ModuleID = new ModuleID(organization, name, revision)
|
||||
def apply(organization: String, name: String, revision: String, configurations: Option[String], isChanging: Boolean, isTransitive: Boolean, isForce: Boolean, explicitArtifacts: Vector[sbt.librarymanagement.Artifact], inclusions: Vector[sbt.librarymanagement.InclExclRule], exclusions: Vector[sbt.librarymanagement.InclExclRule], extraAttributes: Map[String, String], crossVersion: sbt.librarymanagement.CrossVersion, branchName: Option[String]): ModuleID = new ModuleID(organization, name, revision, configurations, isChanging, isTransitive, isForce, explicitArtifacts, inclusions, exclusions, extraAttributes, crossVersion, branchName)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ final class ModuleInfo private (
|
|||
override def toString: String = {
|
||||
"ModuleInfo(" + nameFormal + ", " + description + ", " + homepage + ", " + startYear + ", " + licenses + ", " + organizationName + ", " + organizationHomepage + ", " + scmInfo + ", " + developers + ")"
|
||||
}
|
||||
protected[this] def copy(nameFormal: String = nameFormal, description: String = description, homepage: Option[java.net.URL] = homepage, startYear: Option[Int] = startYear, licenses: Vector[scala.Tuple2[String, java.net.URL]] = licenses, organizationName: String = organizationName, organizationHomepage: Option[java.net.URL] = organizationHomepage, scmInfo: Option[sbt.librarymanagement.ScmInfo] = scmInfo, developers: Vector[sbt.librarymanagement.Developer] = developers): ModuleInfo = {
|
||||
private[this] def copy(nameFormal: String = nameFormal, description: String = description, homepage: Option[java.net.URL] = homepage, startYear: Option[Int] = startYear, licenses: Vector[scala.Tuple2[String, java.net.URL]] = licenses, organizationName: String = organizationName, organizationHomepage: Option[java.net.URL] = organizationHomepage, scmInfo: Option[sbt.librarymanagement.ScmInfo] = scmInfo, developers: Vector[sbt.librarymanagement.Developer] = developers): ModuleInfo = {
|
||||
new ModuleInfo(nameFormal, description, homepage, startYear, licenses, organizationName, organizationHomepage, scmInfo, developers)
|
||||
}
|
||||
def withNameFormal(nameFormal: String): ModuleInfo = {
|
||||
|
|
@ -61,6 +61,6 @@ final class ModuleInfo private (
|
|||
}
|
||||
object ModuleInfo {
|
||||
|
||||
def apply(nameFormal: String): ModuleInfo = new ModuleInfo(nameFormal, "", None, None, Vector.empty, "", None, None, Vector.empty)
|
||||
def apply(nameFormal: String): ModuleInfo = new ModuleInfo(nameFormal)
|
||||
def apply(nameFormal: String, description: String, homepage: Option[java.net.URL], startYear: Option[Int], licenses: Vector[scala.Tuple2[String, java.net.URL]], organizationName: String, organizationHomepage: Option[java.net.URL], scmInfo: Option[sbt.librarymanagement.ScmInfo], developers: Vector[sbt.librarymanagement.Developer]): ModuleInfo = new ModuleInfo(nameFormal, description, homepage, startYear, licenses, organizationName, organizationHomepage, scmInfo, developers)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ final class ModuleReport private (
|
|||
s"\t\t$module: " +
|
||||
(if (arts.size <= 1) "" else "\n\t\t\t") + arts.mkString("\n\t\t\t") + "\n"
|
||||
}
|
||||
protected[this] def copy(module: sbt.librarymanagement.ModuleID = module, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]] = artifacts, missingArtifacts: Vector[sbt.librarymanagement.Artifact] = missingArtifacts, status: Option[String] = status, publicationDate: Option[java.util.Calendar] = publicationDate, resolver: Option[String] = resolver, artifactResolver: Option[String] = artifactResolver, evicted: Boolean = evicted, evictedData: Option[String] = evictedData, evictedReason: Option[String] = evictedReason, problem: Option[String] = problem, homepage: Option[String] = homepage, extraAttributes: Map[String, String] = extraAttributes, isDefault: Option[Boolean] = isDefault, branch: Option[String] = branch, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, licenses: Vector[scala.Tuple2[String, Option[String]]] = licenses, callers: Vector[sbt.librarymanagement.Caller] = callers): ModuleReport = {
|
||||
private[this] def copy(module: sbt.librarymanagement.ModuleID = module, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]] = artifacts, missingArtifacts: Vector[sbt.librarymanagement.Artifact] = missingArtifacts, status: Option[String] = status, publicationDate: Option[java.util.Calendar] = publicationDate, resolver: Option[String] = resolver, artifactResolver: Option[String] = artifactResolver, evicted: Boolean = evicted, evictedData: Option[String] = evictedData, evictedReason: Option[String] = evictedReason, problem: Option[String] = problem, homepage: Option[String] = homepage, extraAttributes: Map[String, String] = extraAttributes, isDefault: Option[Boolean] = isDefault, branch: Option[String] = branch, configurations: Vector[sbt.librarymanagement.ConfigRef] = configurations, licenses: Vector[scala.Tuple2[String, Option[String]]] = licenses, callers: Vector[sbt.librarymanagement.Caller] = callers): ModuleReport = {
|
||||
new ModuleReport(module, artifacts, missingArtifacts, status, publicationDate, resolver, artifactResolver, evicted, evictedData, evictedReason, problem, homepage, extraAttributes, isDefault, branch, configurations, licenses, callers)
|
||||
}
|
||||
def withModule(module: sbt.librarymanagement.ModuleID): ModuleReport = {
|
||||
|
|
@ -101,6 +101,6 @@ final class ModuleReport private (
|
|||
}
|
||||
object ModuleReport {
|
||||
|
||||
def apply(module: sbt.librarymanagement.ModuleID, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]], missingArtifacts: Vector[sbt.librarymanagement.Artifact]): ModuleReport = new ModuleReport(module, artifacts, missingArtifacts, None, None, None, None, false, None, None, None, None, Map.empty, None, None, Vector.empty, Vector.empty, Vector.empty)
|
||||
def apply(module: sbt.librarymanagement.ModuleID, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]], missingArtifacts: Vector[sbt.librarymanagement.Artifact]): ModuleReport = new ModuleReport(module, artifacts, missingArtifacts)
|
||||
def apply(module: sbt.librarymanagement.ModuleID, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]], missingArtifacts: Vector[sbt.librarymanagement.Artifact], status: Option[String], publicationDate: Option[java.util.Calendar], resolver: Option[String], artifactResolver: Option[String], evicted: Boolean, evictedData: Option[String], evictedReason: Option[String], problem: Option[String], homepage: Option[String], extraAttributes: Map[String, String], isDefault: Option[Boolean], branch: Option[String], configurations: Vector[sbt.librarymanagement.ConfigRef], licenses: Vector[scala.Tuple2[String, Option[String]]], callers: Vector[sbt.librarymanagement.Caller]): ModuleReport = new ModuleReport(module, artifacts, missingArtifacts, status, publicationDate, resolver, artifactResolver, evicted, evictedData, evictedReason, problem, homepage, extraAttributes, isDefault, branch, configurations, licenses, callers)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ final class OrganizationArtifactReport private (
|
|||
val details = modules map { _.detailReport }
|
||||
s"\t$organization:$name\n${details.mkString}\n"
|
||||
}
|
||||
protected[this] def copy(organization: String = organization, name: String = name, modules: Vector[sbt.librarymanagement.ModuleReport] = modules): OrganizationArtifactReport = {
|
||||
private[this] def copy(organization: String = organization, name: String = name, modules: Vector[sbt.librarymanagement.ModuleReport] = modules): OrganizationArtifactReport = {
|
||||
new OrganizationArtifactReport(organization, name, modules)
|
||||
}
|
||||
def withOrganization(organization: String): OrganizationArtifactReport = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class PasswordAuthentication private (
|
|||
override def toString: String = {
|
||||
"PasswordAuthentication(" + user + ", " + password + ")"
|
||||
}
|
||||
protected[this] def copy(user: String = user, password: Option[String] = password): PasswordAuthentication = {
|
||||
private[this] def copy(user: String = user, password: Option[String] = password): PasswordAuthentication = {
|
||||
new PasswordAuthentication(user, password)
|
||||
}
|
||||
def withUser(user: String): PasswordAuthentication = {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ override def hashCode: Int = {
|
|||
override def toString: String = {
|
||||
"Patch()"
|
||||
}
|
||||
protected[this] def copy(): Patch = {
|
||||
private[this] def copy(): Patch = {
|
||||
new Patch()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final class Patterns private (
|
|||
"Patterns(ivyPatterns=%s, artifactPatterns=%s, isMavenCompatible=%s, descriptorOptional=%s, skipConsistencyCheck=%s)".format(
|
||||
ivyPatterns, artifactPatterns, isMavenCompatible, descriptorOptional, skipConsistencyCheck)
|
||||
}
|
||||
protected[this] def copy(ivyPatterns: Vector[String] = ivyPatterns, artifactPatterns: Vector[String] = artifactPatterns, isMavenCompatible: Boolean = isMavenCompatible, descriptorOptional: Boolean = descriptorOptional, skipConsistencyCheck: Boolean = skipConsistencyCheck): Patterns = {
|
||||
private[this] def copy(ivyPatterns: Vector[String] = ivyPatterns, artifactPatterns: Vector[String] = artifactPatterns, isMavenCompatible: Boolean = isMavenCompatible, descriptorOptional: Boolean = descriptorOptional, skipConsistencyCheck: Boolean = skipConsistencyCheck): Patterns = {
|
||||
new Patterns(ivyPatterns, artifactPatterns, isMavenCompatible, descriptorOptional, skipConsistencyCheck)
|
||||
}
|
||||
def withIvyPatterns(ivyPatterns: Vector[String]): Patterns = {
|
||||
|
|
@ -45,6 +45,6 @@ final class Patterns private (
|
|||
}
|
||||
object Patterns extends sbt.librarymanagement.PatternsFunctions {
|
||||
|
||||
def apply(): Patterns = new Patterns(Vector.empty, Vector.empty, true, false, false)
|
||||
def apply(): Patterns = new Patterns()
|
||||
def apply(ivyPatterns: Vector[String], artifactPatterns: Vector[String], isMavenCompatible: Boolean, descriptorOptional: Boolean, skipConsistencyCheck: Boolean): Patterns = new Patterns(ivyPatterns, artifactPatterns, isMavenCompatible, descriptorOptional, skipConsistencyCheck)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class PomConfiguration private (
|
|||
override def toString: String = {
|
||||
"PomConfiguration(" + validate + ", " + scalaModuleInfo + ", " + file + ", " + autoScalaTools + ")"
|
||||
}
|
||||
protected[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, file: java.io.File = file, autoScalaTools: Boolean = autoScalaTools): PomConfiguration = {
|
||||
private[this] def copy(validate: Boolean = validate, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo] = scalaModuleInfo, file: java.io.File = file, autoScalaTools: Boolean = autoScalaTools): PomConfiguration = {
|
||||
new PomConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
|
||||
}
|
||||
def withValidate(validate: Boolean): PomConfiguration = {
|
||||
|
|
@ -43,7 +43,7 @@ final class PomConfiguration private (
|
|||
}
|
||||
object PomConfiguration {
|
||||
|
||||
def apply(file: java.io.File, autoScalaTools: Boolean): PomConfiguration = new PomConfiguration(false, None, file, autoScalaTools)
|
||||
def apply(file: java.io.File, autoScalaTools: Boolean): PomConfiguration = new PomConfiguration(file, autoScalaTools)
|
||||
def apply(validate: Boolean, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo], file: java.io.File, autoScalaTools: Boolean): PomConfiguration = new PomConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
|
||||
def apply(validate: Boolean, scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo, file: java.io.File, autoScalaTools: Boolean): PomConfiguration = new PomConfiguration(validate, Option(scalaModuleInfo), file, autoScalaTools)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ final class PublishConfiguration private (
|
|||
override def toString: String = {
|
||||
"PublishConfiguration(" + publishMavenStyle + ", " + deliverIvyPattern + ", " + status + ", " + configurations + ", " + resolverName + ", " + artifacts + ", " + checksums + ", " + logging + ", " + overwrite + ")"
|
||||
}
|
||||
protected[this] def copy(publishMavenStyle: Boolean = publishMavenStyle, deliverIvyPattern: Option[String] = deliverIvyPattern, status: Option[String] = status, configurations: Option[scala.Vector[sbt.librarymanagement.ConfigRef]] = configurations, resolverName: Option[String] = resolverName, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]] = artifacts, checksums: scala.Vector[String] = checksums, logging: Option[sbt.librarymanagement.UpdateLogging] = logging, overwrite: Boolean = overwrite): PublishConfiguration = {
|
||||
private[this] def copy(publishMavenStyle: Boolean = publishMavenStyle, deliverIvyPattern: Option[String] = deliverIvyPattern, status: Option[String] = status, configurations: Option[scala.Vector[sbt.librarymanagement.ConfigRef]] = configurations, resolverName: Option[String] = resolverName, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]] = artifacts, checksums: scala.Vector[String] = checksums, logging: Option[sbt.librarymanagement.UpdateLogging] = logging, overwrite: Boolean = overwrite): PublishConfiguration = {
|
||||
new PublishConfiguration(publishMavenStyle, deliverIvyPattern, status, configurations, resolverName, artifacts, checksums, logging, overwrite)
|
||||
}
|
||||
def withPublishMavenStyle(publishMavenStyle: Boolean): PublishConfiguration = {
|
||||
|
|
@ -75,7 +75,7 @@ final class PublishConfiguration private (
|
|||
}
|
||||
object PublishConfiguration {
|
||||
|
||||
def apply(): PublishConfiguration = new PublishConfiguration(true, None, None, None, None, Vector(), Vector("sha1", "md5"), None, false)
|
||||
def apply(): PublishConfiguration = new PublishConfiguration()
|
||||
def apply(publishMavenStyle: Boolean, deliverIvyPattern: Option[String], status: Option[String], configurations: Option[scala.Vector[sbt.librarymanagement.ConfigRef]], resolverName: Option[String], artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]], checksums: scala.Vector[String], logging: Option[sbt.librarymanagement.UpdateLogging], overwrite: Boolean): PublishConfiguration = new PublishConfiguration(publishMavenStyle, deliverIvyPattern, status, configurations, resolverName, artifacts, checksums, logging, overwrite)
|
||||
def apply(publishMavenStyle: Boolean, deliverIvyPattern: String, status: String, configurations: scala.Vector[sbt.librarymanagement.ConfigRef], resolverName: String, artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]], checksums: scala.Vector[String], logging: sbt.librarymanagement.UpdateLogging, overwrite: Boolean): PublishConfiguration = new PublishConfiguration(publishMavenStyle, Option(deliverIvyPattern), Option(status), Option(configurations), Option(resolverName), artifacts, checksums, Option(logging), overwrite)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final class RetrieveConfiguration private (
|
|||
override def toString: String = {
|
||||
"RetrieveConfiguration(" + retrieveDirectory + ", " + outputPattern + ", " + sync + ", " + configurationsToRetrieve + ")"
|
||||
}
|
||||
protected[this] def copy(retrieveDirectory: Option[java.io.File] = retrieveDirectory, outputPattern: Option[String] = outputPattern, sync: Boolean = sync, configurationsToRetrieve: Option[scala.Vector[sbt.librarymanagement.ConfigRef]] = configurationsToRetrieve): RetrieveConfiguration = {
|
||||
private[this] def copy(retrieveDirectory: Option[java.io.File] = retrieveDirectory, outputPattern: Option[String] = outputPattern, sync: Boolean = sync, configurationsToRetrieve: Option[scala.Vector[sbt.librarymanagement.ConfigRef]] = configurationsToRetrieve): RetrieveConfiguration = {
|
||||
new RetrieveConfiguration(retrieveDirectory, outputPattern, sync, configurationsToRetrieve)
|
||||
}
|
||||
def withRetrieveDirectory(retrieveDirectory: Option[java.io.File]): RetrieveConfiguration = {
|
||||
|
|
@ -50,9 +50,9 @@ final class RetrieveConfiguration private (
|
|||
}
|
||||
object RetrieveConfiguration {
|
||||
|
||||
def apply(): RetrieveConfiguration = new RetrieveConfiguration(None, None, false, None)
|
||||
def apply(retrieveDirectory: Option[java.io.File], outputPattern: Option[String]): RetrieveConfiguration = new RetrieveConfiguration(retrieveDirectory, outputPattern, false, None)
|
||||
def apply(retrieveDirectory: java.io.File, outputPattern: String): RetrieveConfiguration = new RetrieveConfiguration(Option(retrieveDirectory), Option(outputPattern), false, None)
|
||||
def apply(): RetrieveConfiguration = new RetrieveConfiguration()
|
||||
def apply(retrieveDirectory: Option[java.io.File], outputPattern: Option[String]): RetrieveConfiguration = new RetrieveConfiguration(retrieveDirectory, outputPattern)
|
||||
def apply(retrieveDirectory: java.io.File, outputPattern: String): RetrieveConfiguration = new RetrieveConfiguration(Option(retrieveDirectory), Option(outputPattern))
|
||||
def apply(retrieveDirectory: Option[java.io.File], outputPattern: Option[String], sync: Boolean, configurationsToRetrieve: Option[scala.Vector[sbt.librarymanagement.ConfigRef]]): RetrieveConfiguration = new RetrieveConfiguration(retrieveDirectory, outputPattern, sync, configurationsToRetrieve)
|
||||
def apply(retrieveDirectory: java.io.File, outputPattern: String, sync: Boolean, configurationsToRetrieve: scala.Vector[sbt.librarymanagement.ConfigRef]): RetrieveConfiguration = new RetrieveConfiguration(Option(retrieveDirectory), Option(outputPattern), sync, Option(configurationsToRetrieve))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class ScalaModuleInfo private (
|
|||
override def toString: String = {
|
||||
"ScalaModuleInfo(" + scalaFullVersion + ", " + scalaBinaryVersion + ", " + configurations + ", " + checkExplicit + ", " + filterImplicit + ", " + overrideScalaVersion + ", " + scalaOrganization + ", " + scalaArtifacts + ")"
|
||||
}
|
||||
protected[this] def copy(scalaFullVersion: String = scalaFullVersion, scalaBinaryVersion: String = scalaBinaryVersion, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, checkExplicit: Boolean = checkExplicit, filterImplicit: Boolean = filterImplicit, overrideScalaVersion: Boolean = overrideScalaVersion, scalaOrganization: String = scalaOrganization, scalaArtifacts: scala.Vector[String] = scalaArtifacts): ScalaModuleInfo = {
|
||||
private[this] def copy(scalaFullVersion: String = scalaFullVersion, scalaBinaryVersion: String = scalaBinaryVersion, configurations: Vector[sbt.librarymanagement.Configuration] = configurations, checkExplicit: Boolean = checkExplicit, filterImplicit: Boolean = filterImplicit, overrideScalaVersion: Boolean = overrideScalaVersion, scalaOrganization: String = scalaOrganization, scalaArtifacts: scala.Vector[String] = scalaArtifacts): ScalaModuleInfo = {
|
||||
new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
|
||||
}
|
||||
def withScalaFullVersion(scalaFullVersion: String): ScalaModuleInfo = {
|
||||
|
|
@ -56,6 +56,6 @@ final class ScalaModuleInfo private (
|
|||
}
|
||||
object ScalaModuleInfo {
|
||||
|
||||
def apply(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Vector[sbt.librarymanagement.Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean): ScalaModuleInfo = new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, sbt.librarymanagement.ScalaArtifacts.Organization, sbt.librarymanagement.ScalaArtifacts.Artifacts)
|
||||
def apply(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Vector[sbt.librarymanagement.Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean): ScalaModuleInfo = new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion)
|
||||
def apply(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Vector[sbt.librarymanagement.Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean, scalaOrganization: String, scalaArtifacts: scala.Vector[String]): ScalaModuleInfo = new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class ScmInfo private (
|
|||
override def toString: String = {
|
||||
"ScmInfo(" + browseUrl + ", " + connection + ", " + devConnection + ")"
|
||||
}
|
||||
protected[this] def copy(browseUrl: java.net.URL = browseUrl, connection: String = connection, devConnection: Option[String] = devConnection): ScmInfo = {
|
||||
private[this] def copy(browseUrl: java.net.URL = browseUrl, connection: String = connection, devConnection: Option[String] = devConnection): ScmInfo = {
|
||||
new ScmInfo(browseUrl, connection, devConnection)
|
||||
}
|
||||
def withBrowseUrl(browseUrl: java.net.URL): ScmInfo = {
|
||||
|
|
@ -40,7 +40,7 @@ final class ScmInfo private (
|
|||
}
|
||||
object ScmInfo {
|
||||
|
||||
def apply(browseUrl: java.net.URL, connection: String): ScmInfo = new ScmInfo(browseUrl, connection, None)
|
||||
def apply(browseUrl: java.net.URL, connection: String): ScmInfo = new ScmInfo(browseUrl, connection)
|
||||
def apply(browseUrl: java.net.URL, connection: String, devConnection: Option[String]): ScmInfo = new ScmInfo(browseUrl, connection, devConnection)
|
||||
def apply(browseUrl: java.net.URL, connection: String, devConnection: String): ScmInfo = new ScmInfo(browseUrl, connection, Option(devConnection))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final class SftpRepository private (
|
|||
override def toString: String = {
|
||||
"SftpRepository(" + name + ", " + patterns + ", " + connection + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, connection: sbt.librarymanagement.SshConnection = connection): SftpRepository = {
|
||||
private[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, connection: sbt.librarymanagement.SshConnection = connection): SftpRepository = {
|
||||
new SftpRepository(name, patterns, connection)
|
||||
}
|
||||
def withName(name: String): SftpRepository = {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ final class SshConnection private (
|
|||
override def toString: String = {
|
||||
"SshConnection(" + authentication + ", " + hostname + ", " + port + ")"
|
||||
}
|
||||
protected[this] def copy(authentication: Option[sbt.librarymanagement.SshAuthentication] = authentication, hostname: Option[String] = hostname, port: Option[Int] = port): SshConnection = {
|
||||
private[this] def copy(authentication: Option[sbt.librarymanagement.SshAuthentication] = authentication, hostname: Option[String] = hostname, port: Option[Int] = port): SshConnection = {
|
||||
new SshConnection(authentication, hostname, port)
|
||||
}
|
||||
def withAuthentication(authentication: Option[sbt.librarymanagement.SshAuthentication]): SshConnection = {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final class SshRepository private (
|
|||
override def toString: String = {
|
||||
"SshRepository(" + name + ", " + patterns + ", " + connection + ", " + publishPermissions + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, connection: sbt.librarymanagement.SshConnection = connection, publishPermissions: Option[String] = publishPermissions): SshRepository = {
|
||||
private[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, connection: sbt.librarymanagement.SshConnection = connection, publishPermissions: Option[String] = publishPermissions): SshRepository = {
|
||||
new SshRepository(name, patterns, connection, publishPermissions)
|
||||
}
|
||||
def withName(name: String): SshRepository = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class URLRepository private (
|
|||
override def toString: String = {
|
||||
"URLRepository(" + name + ", " + patterns + ")"
|
||||
}
|
||||
protected[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns): URLRepository = {
|
||||
private[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns): URLRepository = {
|
||||
new URLRepository(name, patterns)
|
||||
}
|
||||
def withName(name: String): URLRepository = {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ final class UpdateConfiguration private (
|
|||
override def toString: String = {
|
||||
"UpdateConfiguration(" + retrieveManaged + ", " + missingOk + ", " + logging + ", " + logicalClock + ", " + metadataDirectory + ", " + artifactFilter + ", " + offline + ", " + frozen + ")"
|
||||
}
|
||||
protected[this] def copy(retrieveManaged: Option[sbt.librarymanagement.RetrieveConfiguration] = retrieveManaged, missingOk: Boolean = missingOk, logging: sbt.librarymanagement.UpdateLogging = logging, logicalClock: sbt.librarymanagement.LogicalClock = logicalClock, metadataDirectory: Option[java.io.File] = metadataDirectory, artifactFilter: Option[sbt.librarymanagement.ArtifactTypeFilter] = artifactFilter, offline: Boolean = offline, frozen: Boolean = frozen): UpdateConfiguration = {
|
||||
private[this] def copy(retrieveManaged: Option[sbt.librarymanagement.RetrieveConfiguration] = retrieveManaged, missingOk: Boolean = missingOk, logging: sbt.librarymanagement.UpdateLogging = logging, logicalClock: sbt.librarymanagement.LogicalClock = logicalClock, metadataDirectory: Option[java.io.File] = metadataDirectory, artifactFilter: Option[sbt.librarymanagement.ArtifactTypeFilter] = artifactFilter, offline: Boolean = offline, frozen: Boolean = frozen): UpdateConfiguration = {
|
||||
new UpdateConfiguration(retrieveManaged, missingOk, logging, logicalClock, metadataDirectory, artifactFilter, offline, frozen)
|
||||
}
|
||||
def withRetrieveManaged(retrieveManaged: Option[sbt.librarymanagement.RetrieveConfiguration]): UpdateConfiguration = {
|
||||
|
|
@ -76,7 +76,7 @@ final class UpdateConfiguration private (
|
|||
}
|
||||
object UpdateConfiguration {
|
||||
|
||||
def apply(): UpdateConfiguration = new UpdateConfiguration(None, false, sbt.librarymanagement.UpdateLogging.Default, sbt.librarymanagement.LogicalClock.unknown, None, None, false, false)
|
||||
def apply(): UpdateConfiguration = new UpdateConfiguration()
|
||||
def apply(retrieveManaged: Option[sbt.librarymanagement.RetrieveConfiguration], missingOk: Boolean, logging: sbt.librarymanagement.UpdateLogging, logicalClock: sbt.librarymanagement.LogicalClock, metadataDirectory: Option[java.io.File], artifactFilter: Option[sbt.librarymanagement.ArtifactTypeFilter], offline: Boolean, frozen: Boolean): UpdateConfiguration = new UpdateConfiguration(retrieveManaged, missingOk, logging, logicalClock, metadataDirectory, artifactFilter, offline, frozen)
|
||||
def apply(retrieveManaged: sbt.librarymanagement.RetrieveConfiguration, missingOk: Boolean, logging: sbt.librarymanagement.UpdateLogging, logicalClock: sbt.librarymanagement.LogicalClock, metadataDirectory: java.io.File, artifactFilter: sbt.librarymanagement.ArtifactTypeFilter, offline: Boolean, frozen: Boolean): UpdateConfiguration = new UpdateConfiguration(Option(retrieveManaged), missingOk, logging, logicalClock, Option(metadataDirectory), Option(artifactFilter), offline, frozen)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class UpdateReport private (
|
|||
override def toString: String = {
|
||||
"Update report:\n\t" + stats + "\n" + configurations.mkString
|
||||
}
|
||||
protected[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[java.io.File, Long] = stamps): UpdateReport = {
|
||||
private[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[java.io.File, Long] = stamps): UpdateReport = {
|
||||
new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
}
|
||||
def withCachedDescriptor(cachedDescriptor: java.io.File): UpdateReport = {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ final class UpdateStats private (
|
|||
override def toString: String = {
|
||||
Seq("Resolve time: " + resolveTime + " ms", "Download time: " + downloadTime + " ms", "Download size: " + downloadSize + " bytes").mkString(", ")
|
||||
}
|
||||
protected[this] def copy(resolveTime: Long = resolveTime, downloadTime: Long = downloadTime, downloadSize: Long = downloadSize, cached: Boolean = cached): UpdateStats = {
|
||||
private[this] def copy(resolveTime: Long = resolveTime, downloadTime: Long = downloadTime, downloadSize: Long = downloadSize, cached: Boolean = cached): UpdateStats = {
|
||||
new UpdateStats(resolveTime, downloadTime, downloadSize, cached)
|
||||
}
|
||||
def withResolveTime(resolveTime: Long): UpdateStats = {
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@
|
|||
},
|
||||
{ "name": "conflictManager", "type": "sbt.librarymanagement.ConflictManager", "default": "sbt.librarymanagement.ConflictManager.default", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.internal.librarymanagement.InlineConfigurationFunctions"
|
||||
"parentsCompanion": "sbt.librarymanagement.InlineConfigurationFunctions"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"types": [
|
||||
{
|
||||
"name": "MakePomConfiguration",
|
||||
"namespace": "sbt.librarymanagement",
|
||||
"target": "Scala",
|
||||
"type": "record",
|
||||
"generateCodec": false,
|
||||
"fields": [
|
||||
{ "name": "file", "type": "java.io.File?" },
|
||||
{ "name": "moduleInfo", "type": "sbt.librarymanagement.ModuleInfo?" },
|
||||
{ "name": "configurations", "type": "scala.Vector[sbt.librarymanagement.Configuration]?" },
|
||||
{ "name": "extra", "type": "scala.xml.NodeSeq?" },
|
||||
{ "name": "process", "type": "scala.Function1[scala.xml.Node, scala.xml.Node]" },
|
||||
{ "name": "filterRepositories", "type": "scala.Function1[sbt.librarymanagement.MavenRepository, Boolean]" },
|
||||
{ "name": "allRepositories", "type": "boolean" },
|
||||
{ "name": "includeTypes", "type": "Set[String]" }
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.MakePomConfigurationFunctions"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt.internal.librarymanagement
|
||||
package sbt.librarymanagement
|
||||
|
||||
import sbt.librarymanagement._
|
||||
|
||||
abstract class InlineConfigurationFunctions {
|
||||
private[librarymanagement] abstract class InlineConfigurationFunctions {
|
||||
def configurations(
|
||||
explicitConfigurations: Iterable[Configuration],
|
||||
defaultConfiguration: Option[Configuration]
|
||||
|
|
|
|||
|
|
@ -6,34 +6,18 @@ package sbt.librarymanagement
|
|||
import java.io.File
|
||||
import java.net.URL
|
||||
|
||||
abstract class ArtifactExtra {
|
||||
def name: String
|
||||
def `type`: String
|
||||
def extension: String
|
||||
def classifier: Option[String]
|
||||
def configurations: Vector[ConfigRef]
|
||||
def url: Option[URL]
|
||||
private[librarymanagement] abstract class ArtifactExtra {
|
||||
def extraAttributes: Map[String, String]
|
||||
def checksum: Option[Checksum]
|
||||
|
||||
protected[this] def copy(
|
||||
name: String = name,
|
||||
`type`: String = `type`,
|
||||
extension: String = extension,
|
||||
classifier: Option[String] = classifier,
|
||||
configurations: Vector[ConfigRef] = configurations,
|
||||
url: Option[URL] = url,
|
||||
extraAttributes: Map[String, String] = extraAttributes,
|
||||
checksum: Option[Checksum] = checksum
|
||||
): Artifact
|
||||
def withExtraAttributes(extraAttributes: Map[String, String]): Artifact
|
||||
|
||||
def extra(attributes: (String, String)*) =
|
||||
copy(extraAttributes = extraAttributes ++ ModuleID.checkE(attributes))
|
||||
withExtraAttributes(extraAttributes ++ ModuleID.checkE(attributes))
|
||||
}
|
||||
|
||||
import Configurations.{ Optional, Pom, Test }
|
||||
|
||||
abstract class ArtifactFunctions {
|
||||
private[librarymanagement] abstract class ArtifactFunctions {
|
||||
def apply(name: String, extra: Map[String, String]): Artifact =
|
||||
Artifact(name, DefaultType, DefaultExtension, None, Vector.empty, None, extra, None)
|
||||
def apply(name: String, classifier: String): Artifact =
|
||||
|
|
|
|||
|
|
@ -7,20 +7,17 @@ final class Configuration private[sbt] (
|
|||
val name: String,
|
||||
val description: String,
|
||||
val isPublic: Boolean,
|
||||
val extendsConfigs: Vector[sbt.librarymanagement.Configuration],
|
||||
val transitive: Boolean)
|
||||
extends sbt.librarymanagement.ConfigurationExtra
|
||||
val extendsConfigs: Vector[Configuration],
|
||||
val transitive: Boolean
|
||||
) extends ConfigurationExtra
|
||||
with Serializable {
|
||||
|
||||
require(name != null, "name cannot be null")
|
||||
require(name.size > 0, "name cannot be empty")
|
||||
require(name.nonEmpty, "name cannot be empty")
|
||||
require(id != null, "id cannot be null")
|
||||
require(id.size > 0, "id cannot be empty")
|
||||
require(id.nonEmpty, "id cannot be empty")
|
||||
require(id.head.isUpper, s"id must be capitalized: $id")
|
||||
|
||||
private def this(id: String, name: String) =
|
||||
this(id, name, "", true, Vector.empty, true)
|
||||
|
||||
override def equals(o: Any): Boolean = o match {
|
||||
case x: Configuration =>
|
||||
(this.id == x.id) &&
|
||||
|
|
@ -31,50 +28,64 @@ final class Configuration private[sbt] (
|
|||
(this.transitive == x.transitive)
|
||||
case _ => false
|
||||
}
|
||||
override def hashCode: Int = {
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (17 + id.##) + name.##) + description.##) + isPublic.##) + extendsConfigs.##) + transitive.##)
|
||||
}
|
||||
override def toString: String = {
|
||||
name
|
||||
}
|
||||
protected[this] def copy(id: String = id,
|
||||
name: String = name,
|
||||
description: String = description,
|
||||
isPublic: Boolean = isPublic,
|
||||
extendsConfigs: Vector[sbt.librarymanagement.Configuration] =
|
||||
extendsConfigs,
|
||||
transitive: Boolean = transitive): Configuration = {
|
||||
|
||||
override val hashCode: Int =
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (17 +
|
||||
id.##) + name.##) + description.##) + isPublic.##) + extendsConfigs.##) + transitive.##)
|
||||
|
||||
override def toString: String = name
|
||||
|
||||
private[this] def copy(
|
||||
id: String = id,
|
||||
name: String = name,
|
||||
description: String = description,
|
||||
isPublic: Boolean = isPublic,
|
||||
extendsConfigs: Vector[Configuration] = extendsConfigs,
|
||||
transitive: Boolean = transitive
|
||||
): Configuration =
|
||||
new Configuration(id, name, description, isPublic, extendsConfigs, transitive)
|
||||
}
|
||||
|
||||
def withDescription(description: String): Configuration = {
|
||||
copy(description = description)
|
||||
}
|
||||
def withDescription(description: String): Configuration = copy(description = description)
|
||||
|
||||
def withIsPublic(isPublic: Boolean): Configuration = {
|
||||
copy(isPublic = isPublic)
|
||||
}
|
||||
def withIsPublic(isPublic: Boolean): Configuration = copy(isPublic = isPublic)
|
||||
|
||||
def withExtendsConfigs(
|
||||
extendsConfigs: Vector[sbt.librarymanagement.Configuration]): Configuration = {
|
||||
def withExtendsConfigs(extendsConfigs: Vector[Configuration]): Configuration =
|
||||
copy(extendsConfigs = extendsConfigs)
|
||||
}
|
||||
|
||||
def withTransitive(transitive: Boolean): Configuration = {
|
||||
def withTransitive(transitive: Boolean): Configuration =
|
||||
copy(transitive = transitive)
|
||||
}
|
||||
|
||||
def toConfigRef: ConfigRef = ConfigRef(name)
|
||||
}
|
||||
|
||||
object Configuration {
|
||||
// Don't call this directly. It's intended to be used from config macro.
|
||||
def of(id: String, name: String): Configuration =
|
||||
new Configuration(id, name, "", true, Vector.empty, true)
|
||||
def of(id: String,
|
||||
name: String,
|
||||
description: String,
|
||||
isPublic: Boolean,
|
||||
extendsConfigs: Vector[sbt.librarymanagement.Configuration],
|
||||
transitive: Boolean): Configuration =
|
||||
|
||||
def of(
|
||||
id: String,
|
||||
name: String,
|
||||
description: String,
|
||||
isPublic: Boolean,
|
||||
extendsConfigs: Vector[Configuration],
|
||||
transitive: Boolean
|
||||
): Configuration =
|
||||
new Configuration(id, name, description, isPublic, extendsConfigs, transitive)
|
||||
}
|
||||
|
||||
/*
|
||||
Configuration isn't defined with Contraband.
|
||||
|
||||
The reasons that block it from being made a Contraband type (AFAIK):
|
||||
* its hashCode is a val, not a def
|
||||
* it doesn't have companion apply methods, but "of" instead
|
||||
|
||||
Other reasons that I don't think are blocking:
|
||||
* it's constructor is private[sbt] (doesn't matter, Configuration.of is public)
|
||||
|
||||
Reasons that are definitely not blocking:
|
||||
* it has a custom toString, supported by Contraband
|
||||
* it has init requirements, supported by Contraband via parent class
|
||||
* it has other methods, supported by Contraband via parent class
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ object Configurations {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class ConfigurationExtra {
|
||||
private[librarymanagement] abstract class ConfigurationExtra {
|
||||
def id: String
|
||||
def name: String
|
||||
def description: String
|
||||
|
|
@ -142,7 +142,7 @@ private[sbt] object ConfigurationMacro {
|
|||
.map(_.tree.asInstanceOf[c.Tree])
|
||||
}
|
||||
|
||||
abstract class ConfigRefFunctions {
|
||||
private[librarymanagement] abstract class ConfigRefFunctions {
|
||||
implicit def configToConfigRef(c: Configuration): ConfigRef =
|
||||
c.toConfigRef
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import sbt.librarymanagement.syntax._
|
|||
|
||||
final case class ScalaVersion(full: String, binary: String)
|
||||
|
||||
abstract class CrossVersionFunctions {
|
||||
private[librarymanagement] abstract class CrossVersionFunctions {
|
||||
|
||||
/** Compatibility with 0.13 */
|
||||
final val Disabled = sbt.librarymanagement.Disabled
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ package sbt.librarymanagement
|
|||
|
||||
import sbt.librarymanagement.DependencyBuilders.{ Organization, OrganizationArtifactName }
|
||||
|
||||
abstract class InclExclRuleFunctions {
|
||||
private[librarymanagement] abstract class InclExclRuleFunctions {
|
||||
def everything = InclExclRule("*", "*", "*", Vector.empty, Disabled())
|
||||
|
||||
def apply(organization: String, name: String): InclExclRule =
|
||||
|
|
@ -29,24 +29,20 @@ abstract class InclExclRuleFunctions {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class ArtifactTypeFilterExtra {
|
||||
def types: Set[String]
|
||||
private[librarymanagement] abstract class ArtifactTypeFilterExtra {
|
||||
def inverted: Boolean
|
||||
|
||||
protected[this] def copy(
|
||||
types: Set[String] = types,
|
||||
inverted: Boolean = inverted
|
||||
): ArtifactTypeFilter
|
||||
def withInverted(inverted: Boolean): ArtifactTypeFilter
|
||||
|
||||
def invert = copy(inverted = !inverted)
|
||||
def invert = withInverted(!inverted)
|
||||
}
|
||||
|
||||
abstract class ArtifactTypeFilterFunctions {
|
||||
private[librarymanagement] abstract class ArtifactTypeFilterFunctions {
|
||||
def allow(types: Set[String]) = ArtifactTypeFilter(types, false)
|
||||
def forbid(types: Set[String]) = ArtifactTypeFilter(types, true)
|
||||
}
|
||||
|
||||
abstract class ConflictManagerFunctions {
|
||||
private[librarymanagement] abstract class ConflictManagerFunctions {
|
||||
// To avoid NPE (or making the val's below lazy)
|
||||
// For case classes refchecks rewrites apply calls to constructor calls, we have to do it manually
|
||||
def apply(name: String, organization: String = "*", module: String = "*"): ConflictManager
|
||||
|
|
|
|||
|
|
@ -1,137 +0,0 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import scala.xml.{ Node => XNode, NodeSeq }
|
||||
|
||||
/**
|
||||
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
|
||||
*/
|
||||
final class MakePomConfiguration private (val file: Option[File],
|
||||
val moduleInfo: Option[ModuleInfo],
|
||||
val configurations: Option[Vector[Configuration]],
|
||||
val extra: Option[NodeSeq],
|
||||
val process: XNode => XNode,
|
||||
val filterRepositories: MavenRepository => Boolean,
|
||||
val allRepositories: Boolean,
|
||||
val includeTypes: Set[String])
|
||||
extends Serializable {
|
||||
private def this() =
|
||||
this(None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
identity,
|
||||
MakePomConfiguration.constTrue,
|
||||
true,
|
||||
Set(Artifact.DefaultType, Artifact.PomType))
|
||||
|
||||
override def equals(o: Any): Boolean = o match {
|
||||
case x: MakePomConfiguration =>
|
||||
(this.file == x.file) && (this.moduleInfo == x.moduleInfo) && (this.configurations == x.configurations) && (this.extra == x.extra) && (this.process == x.process) && (this.filterRepositories == x.filterRepositories) && (this.allRepositories == x.allRepositories) && (this.includeTypes == x.includeTypes)
|
||||
case _ => false
|
||||
}
|
||||
override def hashCode: Int = {
|
||||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "sbt.librarymanagement.MakePomConfiguration".##) + file.##) + moduleInfo.##) + configurations.##) + extra.##) + process.##) + filterRepositories.##) + allRepositories.##) + includeTypes.##)
|
||||
}
|
||||
override def toString: String = {
|
||||
"MakePomConfiguration(" + file + ", " + moduleInfo + ", " + configurations + ", " + extra + ", " + process + ", " + filterRepositories + ", " + allRepositories + ", " + includeTypes + ")"
|
||||
}
|
||||
protected[this] def copy(file: Option[File] = file,
|
||||
moduleInfo: Option[ModuleInfo] = moduleInfo,
|
||||
configurations: Option[Vector[Configuration]] = configurations,
|
||||
extra: Option[NodeSeq] = extra,
|
||||
process: XNode => XNode = process,
|
||||
filterRepositories: MavenRepository => Boolean = filterRepositories,
|
||||
allRepositories: Boolean = allRepositories,
|
||||
includeTypes: Set[String] = includeTypes): MakePomConfiguration = {
|
||||
new MakePomConfiguration(file,
|
||||
moduleInfo,
|
||||
configurations,
|
||||
extra,
|
||||
process,
|
||||
filterRepositories,
|
||||
allRepositories,
|
||||
includeTypes)
|
||||
}
|
||||
def withFile(file: Option[File]): MakePomConfiguration = {
|
||||
copy(file = file)
|
||||
}
|
||||
def withFile(file: File): MakePomConfiguration = {
|
||||
copy(file = Option(file))
|
||||
}
|
||||
def withModuleInfo(moduleInfo: Option[ModuleInfo]): MakePomConfiguration = {
|
||||
copy(moduleInfo = moduleInfo)
|
||||
}
|
||||
def withModuleInfo(moduleInfo: ModuleInfo): MakePomConfiguration = {
|
||||
copy(moduleInfo = Option(moduleInfo))
|
||||
}
|
||||
def withConfigurations(configurations: Option[Vector[Configuration]]): MakePomConfiguration = {
|
||||
copy(configurations = configurations)
|
||||
}
|
||||
def withExtra(extra: Option[NodeSeq]): MakePomConfiguration = {
|
||||
copy(extra = extra)
|
||||
}
|
||||
def withExtra(extra: NodeSeq): MakePomConfiguration = {
|
||||
copy(extra = Option(extra))
|
||||
}
|
||||
def withProcess(process: XNode => XNode): MakePomConfiguration = {
|
||||
copy(process = process)
|
||||
}
|
||||
def withFilterRepositories(
|
||||
filterRepositories: MavenRepository => Boolean
|
||||
): MakePomConfiguration = {
|
||||
copy(filterRepositories = filterRepositories)
|
||||
}
|
||||
def withAllRepositories(allRepositories: Boolean): MakePomConfiguration = {
|
||||
copy(allRepositories = allRepositories)
|
||||
}
|
||||
def withIncludeTypes(includeTypes: Set[String]): MakePomConfiguration = {
|
||||
copy(includeTypes = includeTypes)
|
||||
}
|
||||
}
|
||||
|
||||
object MakePomConfiguration {
|
||||
private[sbt] lazy val constTrue: MavenRepository => Boolean = _ => true
|
||||
|
||||
def apply(): MakePomConfiguration =
|
||||
new MakePomConfiguration(None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
identity,
|
||||
constTrue,
|
||||
true,
|
||||
Set(Artifact.DefaultType, Artifact.PomType))
|
||||
def apply(file: Option[File],
|
||||
moduleInfo: Option[ModuleInfo],
|
||||
configurations: Option[Vector[Configuration]],
|
||||
extra: Option[NodeSeq],
|
||||
process: XNode => XNode,
|
||||
filterRepositories: MavenRepository => Boolean,
|
||||
allRepositories: Boolean,
|
||||
includeTypes: Set[String]): MakePomConfiguration =
|
||||
new MakePomConfiguration(file,
|
||||
moduleInfo,
|
||||
configurations,
|
||||
extra,
|
||||
process,
|
||||
filterRepositories,
|
||||
allRepositories,
|
||||
includeTypes)
|
||||
def apply(file: File,
|
||||
moduleInfo: ModuleInfo,
|
||||
configurations: Vector[Configuration],
|
||||
extra: NodeSeq,
|
||||
process: XNode => XNode,
|
||||
filterRepositories: MavenRepository => Boolean,
|
||||
allRepositories: Boolean,
|
||||
includeTypes: Set[String]): MakePomConfiguration =
|
||||
new MakePomConfiguration(Option(file),
|
||||
Option(moduleInfo),
|
||||
Option(configurations),
|
||||
Option(extra),
|
||||
process,
|
||||
filterRepositories,
|
||||
allRepositories,
|
||||
includeTypes)
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
private[librarymanagement] abstract class MakePomConfigurationFunctions {
|
||||
private[sbt] lazy val constTrue: MavenRepository => Boolean = _ => true
|
||||
|
||||
def apply(): MakePomConfiguration =
|
||||
MakePomConfiguration(
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
identity(_: scala.xml.Node),
|
||||
constTrue,
|
||||
true,
|
||||
Set(Artifact.DefaultType, Artifact.PomType)
|
||||
)
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ import sbt.internal.librarymanagement.mavenint.SbtPomExtraProperties
|
|||
import scala.collection.mutable.ListBuffer
|
||||
import sbt.librarymanagement.syntax._
|
||||
|
||||
abstract class ModuleIDExtra {
|
||||
private[librarymanagement] abstract class ModuleIDExtra {
|
||||
def organization: String
|
||||
def name: String
|
||||
def revision: String
|
||||
|
|
@ -24,21 +24,14 @@ abstract class ModuleIDExtra {
|
|||
def crossVersion: CrossVersion
|
||||
def branchName: Option[String]
|
||||
|
||||
protected[this] def copy(
|
||||
organization: String = organization,
|
||||
name: String = name,
|
||||
revision: String = revision,
|
||||
configurations: Option[String] = configurations,
|
||||
isChanging: Boolean = isChanging,
|
||||
isTransitive: Boolean = isTransitive,
|
||||
isForce: Boolean = isForce,
|
||||
explicitArtifacts: Vector[Artifact] = explicitArtifacts,
|
||||
inclusions: Vector[InclusionRule] = inclusions,
|
||||
exclusions: Vector[ExclusionRule] = exclusions,
|
||||
extraAttributes: Map[String, String] = extraAttributes,
|
||||
crossVersion: CrossVersion = crossVersion,
|
||||
branchName: Option[String] = branchName
|
||||
): ModuleID
|
||||
def withIsChanging(isChanging: Boolean): ModuleID
|
||||
def withIsTransitive(isTransitive: Boolean): ModuleID
|
||||
def withIsForce(isForce: Boolean): ModuleID
|
||||
def withExplicitArtifacts(explicitArtifacts: Vector[Artifact]): ModuleID
|
||||
def withExclusions(exclusions: Vector[InclExclRule]): ModuleID
|
||||
def withExtraAttributes(extraAttributes: Map[String, String]): ModuleID
|
||||
def withCrossVersion(crossVersion: CrossVersion): ModuleID
|
||||
def withBranchName(branchName: Option[String]): ModuleID
|
||||
|
||||
protected def toStringImpl: String =
|
||||
s"""$organization:$name:$revision""" +
|
||||
|
|
@ -78,14 +71,14 @@ abstract class ModuleIDExtra {
|
|||
def cross(v: Boolean): ModuleID = cross(if (v) CrossVersion.binary else Disabled())
|
||||
|
||||
/** Specifies the cross-version behavior for this module. See [CrossVersion] for details.*/
|
||||
def cross(v: CrossVersion): ModuleID = copy(crossVersion = v)
|
||||
def cross(v: CrossVersion): ModuleID = withCrossVersion(v)
|
||||
|
||||
// () required for chaining
|
||||
/** Do not follow dependencies of this module. Synonym for `intransitive`.*/
|
||||
def notTransitive() = intransitive()
|
||||
|
||||
/** Do not follow dependencies of this module. Synonym for `notTransitive`.*/
|
||||
def intransitive() = copy(isTransitive = false)
|
||||
def intransitive() = withIsTransitive(false)
|
||||
|
||||
/**
|
||||
* Marks this dependency as "changing". Ivy will always check if the metadata has changed and then if the artifact has changed,
|
||||
|
|
@ -93,13 +86,13 @@ abstract class ModuleIDExtra {
|
|||
*
|
||||
* See the "Changes in artifacts" section of https://ant.apache.org/ivy/history/trunk/concept.html for full details.
|
||||
*/
|
||||
def changing() = copy(isChanging = true)
|
||||
def changing() = withIsChanging(true)
|
||||
|
||||
/**
|
||||
* Indicates that conflict resolution should only select this module's revision.
|
||||
* This prevents a newer revision from being pulled in by a transitive dependency, for example.
|
||||
*/
|
||||
def force() = copy(isForce = true)
|
||||
def force() = withIsForce(true)
|
||||
|
||||
/**
|
||||
* Specifies a URL from which the main artifact for this dependency can be downloaded.
|
||||
|
|
@ -116,13 +109,13 @@ abstract class ModuleIDExtra {
|
|||
* these artifact definitions override the information in the dependency's published metadata.
|
||||
*/
|
||||
def artifacts(newArtifacts: Artifact*) =
|
||||
copy(explicitArtifacts = newArtifacts.toVector ++ explicitArtifacts)
|
||||
withExplicitArtifacts(newArtifacts.toVector ++ explicitArtifacts)
|
||||
|
||||
/**
|
||||
* Applies the provided exclusions to dependencies of this module. Note that only exclusions that specify
|
||||
* both the exact organization and name and nothing else will be included in a pom.xml.
|
||||
*/
|
||||
def excludeAll(rules: ExclusionRule*) = copy(exclusions = this.exclusions ++ rules)
|
||||
def excludeAll(rules: ExclusionRule*) = withExclusions(exclusions ++ rules)
|
||||
|
||||
/** Excludes the dependency with organization `org` and `name` from being introduced by this dependency during resolution. */
|
||||
def exclude(org: String, name: String) =
|
||||
|
|
@ -133,7 +126,7 @@ abstract class ModuleIDExtra {
|
|||
* This information will only be published in an ivy.xml and not in a pom.xml.
|
||||
*/
|
||||
def extra(attributes: (String, String)*) =
|
||||
copy(extraAttributes = this.extraAttributes ++ ModuleID.checkE(attributes))
|
||||
withExtraAttributes(extraAttributes ++ ModuleID.checkE(attributes))
|
||||
|
||||
/**
|
||||
* Not recommended for new use. This method is not deprecated, but the `update-classifiers` task is preferred
|
||||
|
|
@ -176,12 +169,12 @@ abstract class ModuleIDExtra {
|
|||
/**
|
||||
* Sets the Ivy branch of this module.
|
||||
*/
|
||||
def branch(branchName: String) = copy(branchName = Some(branchName))
|
||||
def branch(branchName: String) = withBranchName(Some(branchName))
|
||||
|
||||
def branch(branchName: Option[String]) = copy(branchName = branchName)
|
||||
def branch(branchName: Option[String]) = withBranchName(branchName)
|
||||
}
|
||||
|
||||
abstract class ModuleIDFunctions {
|
||||
private[librarymanagement] abstract class ModuleIDFunctions {
|
||||
|
||||
/** Prefixes all keys with `e:` if they are not already so prefixed. */
|
||||
def checkE(attributes: Seq[(String, String)]) =
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ final class RawRepository(val resolver: AnyRef, name: String) extends Resolver(n
|
|||
}
|
||||
}
|
||||
|
||||
abstract class MavenRepositoryFunctions {
|
||||
private[librarymanagement] abstract class MavenRepositoryFunctions {
|
||||
def apply(name: String, root: String, localIfFile: Boolean = true): MavenRepository =
|
||||
MavenRepo(name, root, localIfFile)
|
||||
}
|
||||
|
||||
abstract class PatternsFunctions {
|
||||
private[librarymanagement] abstract class PatternsFunctions {
|
||||
implicit def defaultPatterns: Patterns = Resolver.defaultPatterns
|
||||
|
||||
def apply(artifactPatterns: String*): Patterns = Patterns(true, artifactPatterns: _*)
|
||||
|
|
@ -42,7 +42,7 @@ abstract class PatternsFunctions {
|
|||
}
|
||||
}
|
||||
|
||||
trait SshBasedRepositoryExtra {
|
||||
private[librarymanagement] trait SshBasedRepositoryExtra {
|
||||
|
||||
/** The object representing the configured ssh connection for this repository. */
|
||||
def connection: SshConnection
|
||||
|
|
@ -67,7 +67,7 @@ trait SshBasedRepositoryExtra {
|
|||
copy(KeyFileAuthentication(user, keyfile, password))
|
||||
}
|
||||
|
||||
trait SshRepositoryExtra extends SshBasedRepositoryExtra {
|
||||
private[librarymanagement] trait SshRepositoryExtra extends SshBasedRepositoryExtra {
|
||||
def name: String
|
||||
def patterns: sbt.librarymanagement.Patterns
|
||||
def publishPermissions: Option[String]
|
||||
|
|
@ -78,7 +78,7 @@ trait SshRepositoryExtra extends SshBasedRepositoryExtra {
|
|||
SshRepository(name, connection, patterns, publishPermissions)
|
||||
}
|
||||
|
||||
trait SftpRepositoryExtra extends SshBasedRepositoryExtra {
|
||||
private[librarymanagement] trait SftpRepositoryExtra extends SshBasedRepositoryExtra {
|
||||
def name: String
|
||||
def patterns: sbt.librarymanagement.Patterns
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ private[sbt] class FakeRepository(resolver: AnyRef, name: String) extends xsbti.
|
|||
def rawRepository = new RawRepository(resolver, name)
|
||||
}
|
||||
|
||||
abstract class ResolverFunctions {
|
||||
private[librarymanagement] abstract class ResolverFunctions {
|
||||
private[sbt] def useSecureResolvers =
|
||||
sys.props.get("sbt.repository.secure") map { _.toLowerCase == "true" } getOrElse true
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package sbt.librarymanagement
|
|||
import java.io.File
|
||||
import java.{ util => ju }
|
||||
|
||||
abstract class ConfigurationReportExtra {
|
||||
private[librarymanagement] abstract class ConfigurationReportExtra {
|
||||
def configuration: ConfigRef
|
||||
def modules: Vector[ModuleReport]
|
||||
def details: Vector[OrganizationArtifactReport]
|
||||
|
|
@ -34,7 +34,7 @@ abstract class ConfigurationReportExtra {
|
|||
}, details)
|
||||
}
|
||||
|
||||
abstract class ModuleReportExtra {
|
||||
private[librarymanagement] abstract class ModuleReportExtra {
|
||||
def module: ModuleID
|
||||
def artifacts: Vector[(Artifact, File)]
|
||||
def missingArtifacts: Vector[Artifact]
|
||||
|
|
@ -54,6 +54,8 @@ abstract class ModuleReportExtra {
|
|||
def licenses: Vector[(String, Option[String])]
|
||||
def callers: Vector[Caller]
|
||||
|
||||
def withArtifacts(artifacts: Vector[(Artifact, File)]): ModuleReport
|
||||
|
||||
protected[this] def arts: Vector[String] =
|
||||
artifacts.map(_.toString) ++ missingArtifacts.map(art => "(MISSING) " + art)
|
||||
|
||||
|
|
@ -102,31 +104,10 @@ abstract class ModuleReportExtra {
|
|||
}
|
||||
|
||||
def retrieve(f: (ModuleID, Artifact, File) => File): ModuleReport =
|
||||
copy(artifacts = artifacts.map { case (art, file) => (art, f(module, art, file)) })
|
||||
|
||||
protected[this] def copy(
|
||||
module: ModuleID = module,
|
||||
artifacts: Vector[(Artifact, File)] = artifacts,
|
||||
missingArtifacts: Vector[Artifact] = missingArtifacts,
|
||||
status: Option[String] = status,
|
||||
publicationDate: Option[ju.Calendar] = publicationDate,
|
||||
resolver: Option[String] = resolver,
|
||||
artifactResolver: Option[String] = artifactResolver,
|
||||
evicted: Boolean = evicted,
|
||||
evictedData: Option[String] = evictedData,
|
||||
evictedReason: Option[String] = evictedReason,
|
||||
problem: Option[String] = problem,
|
||||
homepage: Option[String] = homepage,
|
||||
extraAttributes: Map[String, String] = extraAttributes,
|
||||
isDefault: Option[Boolean] = isDefault,
|
||||
branch: Option[String] = branch,
|
||||
configurations: Vector[ConfigRef] = configurations,
|
||||
licenses: Vector[(String, Option[String])] = licenses,
|
||||
callers: Vector[Caller] = callers
|
||||
): ModuleReport
|
||||
withArtifacts(artifacts.map { case (art, file) => (art, f(module, art, file)) })
|
||||
}
|
||||
|
||||
abstract class UpdateReportExtra {
|
||||
private[librarymanagement] abstract class UpdateReportExtra {
|
||||
def cachedDescriptor: File
|
||||
def configurations: Vector[ConfigurationReport]
|
||||
def stats: UpdateStats
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final class ExternalIvyConfiguration private (
|
|||
override def toString: String = {
|
||||
"ExternalIvyConfiguration(" + lock + ", " + log + ", " + updateOptions + ", " + baseDirectory + ", " + uri + ", " + extraResolvers + ")"
|
||||
}
|
||||
protected[this] def copy(lock: Option[xsbti.GlobalLock] = lock, log: Option[xsbti.Logger] = log, updateOptions: sbt.librarymanagement.ivy.UpdateOptions = updateOptions, baseDirectory: Option[java.io.File] = baseDirectory, uri: Option[java.net.URI] = uri, extraResolvers: Vector[sbt.librarymanagement.Resolver] = extraResolvers): ExternalIvyConfiguration = {
|
||||
private[this] def copy(lock: Option[xsbti.GlobalLock] = lock, log: Option[xsbti.Logger] = log, updateOptions: sbt.librarymanagement.ivy.UpdateOptions = updateOptions, baseDirectory: Option[java.io.File] = baseDirectory, uri: Option[java.net.URI] = uri, extraResolvers: Vector[sbt.librarymanagement.Resolver] = extraResolvers): ExternalIvyConfiguration = {
|
||||
new ExternalIvyConfiguration(lock, log, updateOptions, baseDirectory, uri, extraResolvers)
|
||||
}
|
||||
def withLock(lock: Option[xsbti.GlobalLock]): ExternalIvyConfiguration = {
|
||||
|
|
@ -60,7 +60,7 @@ final class ExternalIvyConfiguration private (
|
|||
}
|
||||
object ExternalIvyConfiguration {
|
||||
|
||||
def apply(): ExternalIvyConfiguration = new ExternalIvyConfiguration(None, None, sbt.librarymanagement.ivy.UpdateOptions(), None, None, Vector())
|
||||
def apply(): ExternalIvyConfiguration = new ExternalIvyConfiguration()
|
||||
def apply(lock: Option[xsbti.GlobalLock], log: Option[xsbti.Logger], updateOptions: sbt.librarymanagement.ivy.UpdateOptions, baseDirectory: Option[java.io.File], uri: Option[java.net.URI], extraResolvers: Vector[sbt.librarymanagement.Resolver]): ExternalIvyConfiguration = new ExternalIvyConfiguration(lock, log, updateOptions, baseDirectory, uri, extraResolvers)
|
||||
def apply(lock: xsbti.GlobalLock, log: xsbti.Logger, updateOptions: sbt.librarymanagement.ivy.UpdateOptions, baseDirectory: java.io.File, uri: java.net.URI, extraResolvers: Vector[sbt.librarymanagement.Resolver]): ExternalIvyConfiguration = new ExternalIvyConfiguration(Option(lock), Option(log), updateOptions, Option(baseDirectory), Option(uri), extraResolvers)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ final class InlineIvyConfiguration private (
|
|||
override def toString: String = {
|
||||
"InlineIvyConfiguration(" + lock + ", " + log + ", " + updateOptions + ", " + paths + ", " + resolvers + ", " + otherResolvers + ", " + moduleConfigurations + ", " + checksums + ", " + managedChecksums + ", " + resolutionCacheDir + ")"
|
||||
}
|
||||
protected[this] def copy(lock: Option[xsbti.GlobalLock] = lock, log: Option[xsbti.Logger] = log, updateOptions: sbt.librarymanagement.ivy.UpdateOptions = updateOptions, paths: Option[sbt.librarymanagement.ivy.IvyPaths] = paths, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers, otherResolvers: Vector[sbt.librarymanagement.Resolver] = otherResolvers, moduleConfigurations: Vector[sbt.librarymanagement.ModuleConfiguration] = moduleConfigurations, checksums: Vector[String] = checksums, managedChecksums: Boolean = managedChecksums, resolutionCacheDir: Option[java.io.File] = resolutionCacheDir): InlineIvyConfiguration = {
|
||||
private[this] def copy(lock: Option[xsbti.GlobalLock] = lock, log: Option[xsbti.Logger] = log, updateOptions: sbt.librarymanagement.ivy.UpdateOptions = updateOptions, paths: Option[sbt.librarymanagement.ivy.IvyPaths] = paths, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers, otherResolvers: Vector[sbt.librarymanagement.Resolver] = otherResolvers, moduleConfigurations: Vector[sbt.librarymanagement.ModuleConfiguration] = moduleConfigurations, checksums: Vector[String] = checksums, managedChecksums: Boolean = managedChecksums, resolutionCacheDir: Option[java.io.File] = resolutionCacheDir): InlineIvyConfiguration = {
|
||||
new InlineIvyConfiguration(lock, log, updateOptions, paths, resolvers, otherResolvers, moduleConfigurations, checksums, managedChecksums, resolutionCacheDir)
|
||||
}
|
||||
def withLock(lock: Option[xsbti.GlobalLock]): InlineIvyConfiguration = {
|
||||
|
|
@ -99,7 +99,7 @@ object InlineIvyConfiguration {
|
|||
.withResolutionCacheDir(resolutionCacheDir)
|
||||
.withLog(log)
|
||||
}
|
||||
def apply(): InlineIvyConfiguration = new InlineIvyConfiguration(None, None, sbt.librarymanagement.ivy.UpdateOptions(), None, sbt.librarymanagement.Resolver.defaults, Vector.empty, Vector.empty, sbt.librarymanagement.ivy.IvyDefaults.defaultChecksums, false, None)
|
||||
def apply(): InlineIvyConfiguration = new InlineIvyConfiguration()
|
||||
def apply(lock: Option[xsbti.GlobalLock], log: Option[xsbti.Logger], updateOptions: sbt.librarymanagement.ivy.UpdateOptions, paths: Option[sbt.librarymanagement.ivy.IvyPaths], resolvers: Vector[sbt.librarymanagement.Resolver], otherResolvers: Vector[sbt.librarymanagement.Resolver], moduleConfigurations: Vector[sbt.librarymanagement.ModuleConfiguration], checksums: Vector[String], managedChecksums: Boolean, resolutionCacheDir: Option[java.io.File]): InlineIvyConfiguration = new InlineIvyConfiguration(lock, log, updateOptions, paths, resolvers, otherResolvers, moduleConfigurations, checksums, managedChecksums, resolutionCacheDir)
|
||||
def apply(lock: xsbti.GlobalLock, log: xsbti.Logger, updateOptions: sbt.librarymanagement.ivy.UpdateOptions, paths: sbt.librarymanagement.ivy.IvyPaths, resolvers: Vector[sbt.librarymanagement.Resolver], otherResolvers: Vector[sbt.librarymanagement.Resolver], moduleConfigurations: Vector[sbt.librarymanagement.ModuleConfiguration], checksums: Vector[String], managedChecksums: Boolean, resolutionCacheDir: java.io.File): InlineIvyConfiguration = new InlineIvyConfiguration(Option(lock), Option(log), updateOptions, Option(paths), resolvers, otherResolvers, moduleConfigurations, checksums, managedChecksums, Option(resolutionCacheDir))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ final class IvyPaths private (
|
|||
override def toString: String = {
|
||||
"IvyPaths(" + baseDirectory + ", " + ivyHome + ")"
|
||||
}
|
||||
protected[this] def copy(baseDirectory: java.io.File = baseDirectory, ivyHome: Option[java.io.File] = ivyHome): IvyPaths = {
|
||||
private[this] def copy(baseDirectory: java.io.File = baseDirectory, ivyHome: Option[java.io.File] = ivyHome): IvyPaths = {
|
||||
new IvyPaths(baseDirectory, ivyHome)
|
||||
}
|
||||
def withBaseDirectory(baseDirectory: java.io.File): IvyPaths = {
|
||||
|
|
|
|||
|
|
@ -4,27 +4,30 @@
|
|||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import ivyint.CachedResolutionResolveEngine
|
||||
|
||||
import ivyint.CachedResolutionResolveEngine
|
||||
import org.apache.ivy.Ivy
|
||||
import org.apache.ivy.core.{ IvyPatternHelper, LogOptions }
|
||||
import org.apache.ivy.core.deliver.DeliverOptions
|
||||
import org.apache.ivy.core.install.InstallOptions
|
||||
import org.apache.ivy.core.module.descriptor.{
|
||||
Artifact => IArtifact,
|
||||
DefaultModuleDescriptor,
|
||||
MDArtifact,
|
||||
ModuleDescriptor,
|
||||
DefaultModuleDescriptor
|
||||
Artifact => IArtifact
|
||||
}
|
||||
import org.apache.ivy.core.resolve.ResolveOptions
|
||||
import org.apache.ivy.plugins.resolver.{ BasicResolver, DependencyResolver }
|
||||
import org.apache.ivy.util.filter.{ Filter => IvyFilter }
|
||||
import sbt.io.{ IO, PathFinder }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement.{ ModuleDescriptorConfiguration => InlineConfiguration, _ }, syntax._
|
||||
import sbt.librarymanagement.{ ModuleDescriptorConfiguration => InlineConfiguration, _ }
|
||||
import syntax._
|
||||
import InternalDefaults._
|
||||
import UpdateClassifiersUtil._
|
||||
|
||||
import scala.util.Try
|
||||
|
||||
object IvyActions {
|
||||
|
||||
/** Installs the dependencies of the given 'module' from the resolver named 'from' to the resolver named 'to'.*/
|
||||
|
|
@ -380,7 +383,11 @@ object IvyActions {
|
|||
report: UpdateReport,
|
||||
config: RetrieveConfiguration
|
||||
): UpdateReport = {
|
||||
val copyChecksums = ivy.getVariable(ConvertResolver.ManagedChecksums).toBoolean
|
||||
val copyChecksums =
|
||||
Option(ivy.getVariable(ConvertResolver.ManagedChecksums)) match {
|
||||
case Some(x) => x.toBoolean
|
||||
case _ => false
|
||||
}
|
||||
val toRetrieve: Option[Vector[ConfigRef]] = config.configurationsToRetrieve
|
||||
val base = getRetrieveDirectory(config.retrieveDirectory)
|
||||
val pattern = getRetrievePattern(config.outputPattern)
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ class MakePom(val log: Logger) {
|
|||
def makeExclusion(exclRule: ExcludeRule): Either[String, NodeSeq] = {
|
||||
val m = exclRule.getId.getModuleId
|
||||
val (g, a) = (m.getOrganisation, m.getName)
|
||||
if (g == null || g.isEmpty || g == "*" || a.isEmpty || a == "*")
|
||||
if (g == null || g.isEmpty || a == null || a.isEmpty)
|
||||
Left(
|
||||
"Skipped generating '<exclusion/>' for %s. Dependency exclusion should have both 'org' and 'module' to comply with Maven POM's schema."
|
||||
.format(m)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ class GigahorseUrlHandler extends AbstractURLHandler {
|
|||
|
||||
if (checkStatusCode(url, response)) {
|
||||
val bodyCharset =
|
||||
BasicURLHandler.getCharSetFromContentType(response.body().contentType().toString)
|
||||
BasicURLHandler.getCharSetFromContentType(
|
||||
Option(response.body().contentType()).map(_.toString).orNull)
|
||||
Some(
|
||||
new SbtUrlInfo(true,
|
||||
response.body().contentLength(),
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@ class InclExclSpec extends BaseIvySpecification {
|
|||
)
|
||||
}
|
||||
|
||||
def testScalaLibraryIsMissing(report: UpdateReport): Assertion = {
|
||||
assert(
|
||||
!report.allModules.exists(_.name.contains("scala-library")),
|
||||
"scala-library has not been excluded."
|
||||
)
|
||||
}
|
||||
|
||||
def testScalahostIsMissing(report: UpdateReport): Assertion = {
|
||||
assert(
|
||||
!report.allModules.exists(_.name.contains("scalahost")),
|
||||
|
|
@ -65,4 +72,16 @@ class InclExclSpec extends BaseIvySpecification {
|
|||
val report = getIvyReport(createMetaDep(excluded), scala2122)
|
||||
testScalahostIsMissing(report)
|
||||
}
|
||||
|
||||
it should "exclude any version of scala-library via * artifact id" in {
|
||||
val toExclude = ExclusionRule("org.scala-lang", "*")
|
||||
val report = getIvyReport(createLiftDep(toExclude), scala210)
|
||||
testScalaLibraryIsMissing(report)
|
||||
}
|
||||
|
||||
it should "exclude any version of scala-library via * org id" in {
|
||||
val toExclude = ExclusionRule("*", "scala-library")
|
||||
val report = getIvyReport(createLiftDep(toExclude), scala210)
|
||||
testScalaLibraryIsMissing(report)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ object Dependencies {
|
|||
val scala212 = "2.12.4"
|
||||
|
||||
private val ioVersion = "1.1.3"
|
||||
private val utilVersion = "1.1.2"
|
||||
private val utilVersion = "1.1.3"
|
||||
|
||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ object Dependencies {
|
|||
|
||||
val launcherInterface = "org.scala-sbt" % "launcher-interface" % "1.0.0"
|
||||
val ivy = "org.scala-sbt.ivy" % "ivy" % "2.3.0-sbt-b18f59ea3bc914a297bb6f1a4f7fb0ace399e310"
|
||||
val jsch = "com.jcraft" % "jsch" % "0.1.46" intransitive ()
|
||||
val jsch = "com.jcraft" % "jsch" % "0.1.54"
|
||||
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
||||
val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
|
||||
val scalaXml = scala211Module("scala-xml", "1.0.5")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.5")
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.0")
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.2")
|
||||
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.9")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue