mirror of https://github.com/sbt/sbt.git
Switch to FooFunctions naming convention for contraband companion parents
This commit is contained in:
parent
5475a3c01c
commit
e7ba7fa9a4
|
|
@ -192,7 +192,7 @@
|
|||
{ "name": "organization", "type": "String", "default": "\"*\"", "since": "0.0.1" },
|
||||
{ "name": "module", "type": "String", "default": "\"*\"", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.ConflictManagerCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.ConflictManagerFunctions"
|
||||
},
|
||||
{
|
||||
"name": "IvyScala",
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
{ "name": "scalaOrganization", "type": "String", "default": "sbt.librarymanagement.ScalaArtifacts.Organization", "since": "0.0.1" },
|
||||
{ "name": "scalaArtifacts", "type": "String*", "default": "sbt.librarymanagement.ScalaArtifacts.Artifacts", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.IvyScalaCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.IvyScalaFunctions"
|
||||
},
|
||||
{
|
||||
"name": "ModuleSettings",
|
||||
|
|
@ -257,7 +257,7 @@
|
|||
{ "name": "defaultConfiguration", "type": "sbt.librarymanagement.Configuration?", "default": "None", "since": "0.0.1" },
|
||||
{ "name": "conflictManager", "type": "sbt.librarymanagement.ConflictManager", "default": "sbt.librarymanagement.ConflictManager.default", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.internal.librarymanagement.InlineConfigurationCompanion"
|
||||
"parentsCompanion": "sbt.internal.librarymanagement.InlineConfigurationFunctions"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -290,7 +290,7 @@
|
|||
{ "name": "artifact", "type": "String", "default": "\"*\"", "since": "0.0.1" },
|
||||
{ "name": "configurations", "type": "String*", "default": "Vector.empty", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.InclExclRuleCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.InclExclRuleFunctions"
|
||||
},
|
||||
{
|
||||
"name": "CrossVersion",
|
||||
|
|
@ -335,7 +335,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.CrossVersionCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.CrossVersionFunctions"
|
||||
},
|
||||
{
|
||||
"name": "Configuration",
|
||||
|
|
@ -368,7 +368,7 @@
|
|||
{ "name": "url", "type": "java.net.URL?", "default": "None", "since": "0.0.1" },
|
||||
{ "name": "extraAttributes", "type": "Map[String, String]", "default": "Map.empty", "since": "0.0.1" }
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.ArtifactCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.ArtifactFunctions"
|
||||
},
|
||||
{
|
||||
"name": "SshAuthentication",
|
||||
|
|
@ -437,7 +437,7 @@
|
|||
"\"Patterns(ivyPatterns=%s, artifactPatterns=%s, isMavenCompatible=%s, descriptorOptional=%s, skipConsistencyCheck=%s)\".format(",
|
||||
" ivyPatterns, artifactPatterns, isMavenCompatible, descriptorOptional, skipConsistencyCheck)"
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.PatternsCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.PatternsFunctions"
|
||||
},
|
||||
{
|
||||
"name": "Resolver",
|
||||
|
|
@ -575,7 +575,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.ResolverCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.ResolverFunctions"
|
||||
},
|
||||
{
|
||||
"name": "ModuleConfiguration",
|
||||
|
|
@ -693,7 +693,7 @@
|
|||
" (configurations match { case Some(s) => \":\" + s; case None => \"\" }) +",
|
||||
" (if (extraAttributes.isEmpty) \"\" else \" \" + extraString)"
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.ModuleIDCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.ModuleIDFunctions"
|
||||
},
|
||||
{
|
||||
"name": "ArtifactTypeFilter",
|
||||
|
|
@ -718,7 +718,7 @@
|
|||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"parentsCompanion": "sbt.librarymanagement.ArtifactTypeFilterCompanion"
|
||||
"parentsCompanion": "sbt.librarymanagement.ArtifactTypeFilterFunctions"
|
||||
},
|
||||
{
|
||||
"name": "UpdateReport",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ package sbt.internal.librarymanagement
|
|||
|
||||
import sbt.librarymanagement._
|
||||
|
||||
abstract class InlineConfigurationCompanion {
|
||||
abstract class InlineConfigurationFunctions {
|
||||
def configurations(explicitConfigurations: Iterable[Configuration], defaultConfiguration: Option[Configuration]) =
|
||||
if (explicitConfigurations.isEmpty) {
|
||||
defaultConfiguration match {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ abstract class ArtifactExtra {
|
|||
|
||||
import Configurations.{ Optional, Pom, Test }
|
||||
|
||||
abstract class ArtifactCompanion {
|
||||
abstract class ArtifactFunctions {
|
||||
def apply(name: String, extra: Map[String, String]): Artifact = Artifact(name, DefaultType, DefaultExtension, None, Vector.empty, None, extra)
|
||||
def apply(name: String, classifier: String): Artifact = Artifact(name, DefaultType, DefaultExtension, Some(classifier), Vector.empty, None)
|
||||
def apply(name: String, `type`: String, extension: String): Artifact = Artifact(name, `type`, extension, None, Vector.empty, None)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import sbt.internal.librarymanagement.cross.CrossVersionUtil
|
|||
|
||||
final case class ScalaVersion(full: String, binary: String)
|
||||
|
||||
abstract class CrossVersionCompanion {
|
||||
abstract class CrossVersionFunctions {
|
||||
/** The first `major.minor` Scala version that the Scala binary version should be used for cross-versioning instead of the full version. */
|
||||
val TransitionScalaVersion = CrossVersionUtil.TransitionScalaVersion
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package sbt.librarymanagement
|
|||
import org.apache.ivy.core.module.descriptor
|
||||
import org.apache.ivy.util.filter.{ Filter => IvyFilter }
|
||||
|
||||
abstract class InclExclRuleCompanion {
|
||||
abstract class InclExclRuleFunctions {
|
||||
def everything = new InclExclRule("*", "*", "*", Vector.empty)
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ abstract class ArtifactTypeFilterExtra {
|
|||
def apply(a: descriptor.Artifact): Boolean = (types contains a.getType) ^ inverted
|
||||
}
|
||||
|
||||
abstract class ArtifactTypeFilterCompanion {
|
||||
abstract class ArtifactTypeFilterFunctions {
|
||||
def allow(types: Set[String]) = ArtifactTypeFilter(types, false)
|
||||
def forbid(types: Set[String]) = ArtifactTypeFilter(types, true)
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ abstract class ArtifactTypeFilterCompanion {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class ConflictManagerCompanion {
|
||||
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
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ object SbtArtifacts {
|
|||
|
||||
import ScalaArtifacts._
|
||||
|
||||
private[sbt] abstract class IvyScalaCompanion {
|
||||
private[sbt] abstract class IvyScalaFunctions {
|
||||
/** Performs checks/adds filters on Scala dependencies (if enabled in IvyScala). */
|
||||
def checkModule(module: DefaultModuleDescriptor, conf: String, log: Logger)(check: IvyScala): Unit = {
|
||||
if (check.checkExplicit)
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ abstract class ModuleIDExtra {
|
|||
def branch(branchName: Option[String]) = copy(branchName = branchName)
|
||||
}
|
||||
|
||||
abstract class ModuleIDCompanion {
|
||||
abstract class ModuleIDFunctions {
|
||||
/** Prefixes all keys with `e:` if they are not already so prefixed. */
|
||||
def checkE(attributes: Seq[(String, String)]) =
|
||||
for ((key, value) <- attributes) yield if (key.startsWith("e:")) (key, value) else ("e:" + key, value)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class RawRepository(val resolver: DependencyResolver) extends Resolver(res
|
|||
}
|
||||
}
|
||||
|
||||
abstract class PatternsCompanion {
|
||||
abstract class PatternsFunctions {
|
||||
implicit def defaultPatterns: Patterns = Resolver.defaultPatterns
|
||||
|
||||
def apply(artifactPatterns: String*): Patterns = Patterns(true, artifactPatterns: _*)
|
||||
|
|
@ -48,7 +48,7 @@ trait ResolversSyntax {
|
|||
val JCenterRepository = new MavenRepository(JCenterRepositoryName, JCenterRepositoryRoot)
|
||||
}
|
||||
|
||||
abstract class ResolverCompanion {
|
||||
abstract class ResolverFunctions {
|
||||
private[sbt] def useSecureResolvers = sys.props.get("sbt.repository.secure") map { _.toLowerCase == "true" } getOrElse true
|
||||
|
||||
val TypesafeRepositoryRoot = typesafeRepositoryRoot(useSecureResolvers)
|
||||
|
|
|
|||
Loading…
Reference in New Issue