Library management API

This splits the core of LM and Ivy-based implementation.

- InlineConfiguration is renamed to ModuleConfiguration
- IvyScala is renamed to ScalaModuleInfo
- UpdateConfiguration, RetrieveConfiguration, PublishConfiguration are refactored to use builder pattern.
- Adds ConfigRef for referencing Configuration
- Moves syntax related things into `sbt.librarymagement.syntax`
This commit is contained in:
Eugene Yokota 2017-07-11 18:39:06 -04:00
parent 0243eb7492
commit 7b22e78fd9
246 changed files with 2441 additions and 1632 deletions

View File

@ -1,12 +1,27 @@
librarymanagement module for sbt
================================
```
git clone --no-hardlinks --branch 0.13 sbt sbt-modules/librarymanagement
cd sbt-modules/librarymanagement
git filter-branch --index-filter 'git rm --cached -qr -- . && git reset -q $GIT_COMMIT -- ivy util/cross' --prune-empty
git reset --hard
git gc --aggressive
git prune
git cb 1.0
```scala
scala> import java.io.File
import java.io.File
scala> import sbt.librarymanagement._, syntax._
import sbt.librarymanagement._
import syntax._
scala> val log = sbt.util.LogExchange.logger("test")
log: sbt.internal.util.ManagedLogger = sbt.internal.util.ManagedLogger@c439b0f
scala> val lm = {
import sbt.librarymanagement.ivy._
val ivyConfig = InlineIvyConfiguration().withLog(log)
IvyLibraryManagement(ivyConfig)
}
lm: sbt.librarymanagement.LibraryManagement = sbt.librarymanagement.ivy.IvyLibraryManagement@11c07acb
scala> val module = "commons-io" % "commons-io" % "2.5"
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
scala> lm.retrieve(module, scalaModuleInfo = None, new File("target"), log)
res0: Either[sbt.librarymanagement.UnresolvedWarning,Vector[java.io.File]] = Right(Vector(target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar))
```

View File

@ -31,7 +31,7 @@ def commonSettings: Seq[Setting[_]] = Seq(
)
lazy val lmRoot = (project in file("."))
.aggregate(lm)
.aggregate(lmCore, lmIvy)
.settings(
inThisBuild(
Seq(
@ -60,12 +60,12 @@ lazy val lmRoot = (project in file("."))
customCommands
)
lazy val lm = (project in file("librarymanagement"))
lazy val lmCore = (project in file("core"))
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.settings(
commonSettings,
name := "librarymanagement",
libraryDependencies ++= Seq(ivy,
jsch,
name := "librarymanagement-core",
libraryDependencies ++= Seq(jsch,
scalaReflect.value,
scalaCompiler.value,
launcherInterface,
@ -94,7 +94,20 @@ lazy val lm = (project in file("librarymanagement"))
}
)
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache)
lazy val lmIvy = (project in file("ivy"))
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.dependsOn(lmCore)
.settings(
commonSettings,
name := "librarymanagement-ivy",
libraryDependencies ++= Seq(ivy, scalaTest, scalaCheck),
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := DatatypeConfig.getFormats,
scalacOptions in (Compile, console) --= Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint"),
)
def customCommands: Seq[Setting[_]] = Seq(
commands += Command.command("release") { state =>

View File

@ -0,0 +1,48 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class GetClassifiersConfiguration private (
val module: sbt.librarymanagement.GetClassifiersModule,
val excludes: Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]],
val updateConfiguration: sbt.librarymanagement.UpdateConfiguration,
val sourceArtifactTypes: Vector[String],
val docArtifactTypes: Vector[String]) extends Serializable {
override def equals(o: Any): Boolean = o match {
case x: GetClassifiersConfiguration => (this.module == x.module) && (this.excludes == x.excludes) && (this.updateConfiguration == x.updateConfiguration) && (this.sourceArtifactTypes == x.sourceArtifactTypes) && (this.docArtifactTypes == x.docArtifactTypes)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (17 + "GetClassifiersConfiguration".##) + module.##) + excludes.##) + updateConfiguration.##) + sourceArtifactTypes.##) + docArtifactTypes.##)
}
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 = {
new GetClassifiersConfiguration(module, excludes, updateConfiguration, sourceArtifactTypes, docArtifactTypes)
}
def withModule(module: sbt.librarymanagement.GetClassifiersModule): GetClassifiersConfiguration = {
copy(module = module)
}
def withExcludes(excludes: Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]]): GetClassifiersConfiguration = {
copy(excludes = excludes)
}
def withUpdateConfiguration(updateConfiguration: sbt.librarymanagement.UpdateConfiguration): GetClassifiersConfiguration = {
copy(updateConfiguration = updateConfiguration)
}
def withSourceArtifactTypes(sourceArtifactTypes: Vector[String]): GetClassifiersConfiguration = {
copy(sourceArtifactTypes = sourceArtifactTypes)
}
def withDocArtifactTypes(docArtifactTypes: Vector[String]): GetClassifiersConfiguration = {
copy(docArtifactTypes = docArtifactTypes)
}
}
object GetClassifiersConfiguration {
def apply(module: sbt.librarymanagement.GetClassifiersModule, excludes: Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]], updateConfiguration: sbt.librarymanagement.UpdateConfiguration, sourceArtifactTypes: Vector[String], docArtifactTypes: Vector[String]): GetClassifiersConfiguration = new GetClassifiersConfiguration(module, excludes, updateConfiguration, sourceArtifactTypes, docArtifactTypes)
}

View File

@ -0,0 +1,35 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait GetClassifiersConfigurationFormats { self: sbt.librarymanagement.GetClassifiersModuleFormats with sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ConfigRefFormats with sbt.librarymanagement.UpdateConfigurationFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val GetClassifiersConfigurationFormat: JsonFormat[sbt.librarymanagement.GetClassifiersConfiguration] = new JsonFormat[sbt.librarymanagement.GetClassifiersConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.GetClassifiersConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val module = unbuilder.readField[sbt.librarymanagement.GetClassifiersModule]("module")
val excludes = unbuilder.readField[Vector[scala.Tuple2[sbt.librarymanagement.ModuleID, scala.Vector[sbt.librarymanagement.ConfigRef]]]]("excludes")
val updateConfiguration = unbuilder.readField[sbt.librarymanagement.UpdateConfiguration]("updateConfiguration")
val sourceArtifactTypes = unbuilder.readField[Vector[String]]("sourceArtifactTypes")
val docArtifactTypes = unbuilder.readField[Vector[String]]("docArtifactTypes")
unbuilder.endObject()
sbt.librarymanagement.GetClassifiersConfiguration(module, excludes, updateConfiguration, sourceArtifactTypes, docArtifactTypes)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.librarymanagement.GetClassifiersConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("module", obj.module)
builder.addField("excludes", obj.excludes)
builder.addField("updateConfiguration", obj.updateConfiguration)
builder.addField("sourceArtifactTypes", obj.sourceArtifactTypes)
builder.addField("docArtifactTypes", obj.docArtifactTypes)
builder.endObject()
}
}
}

View File

@ -0,0 +1,52 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class GetClassifiersModule private (
val id: sbt.librarymanagement.ModuleID,
val scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo],
val dependencies: Vector[sbt.librarymanagement.ModuleID],
val configurations: Vector[sbt.librarymanagement.Configuration],
val classifiers: Vector[String]) extends Serializable {
override def equals(o: Any): Boolean = o match {
case x: GetClassifiersModule => (this.id == x.id) && (this.scalaModuleInfo == x.scalaModuleInfo) && (this.dependencies == x.dependencies) && (this.configurations == x.configurations) && (this.classifiers == x.classifiers)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (17 + "GetClassifiersModule".##) + id.##) + scalaModuleInfo.##) + dependencies.##) + configurations.##) + classifiers.##)
}
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 = {
new GetClassifiersModule(id, scalaModuleInfo, dependencies, configurations, classifiers)
}
def withId(id: sbt.librarymanagement.ModuleID): GetClassifiersModule = {
copy(id = id)
}
def withScalaModuleInfo(scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo]): GetClassifiersModule = {
copy(scalaModuleInfo = scalaModuleInfo)
}
def withScalaModuleInfo(scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo): GetClassifiersModule = {
copy(scalaModuleInfo = Option(scalaModuleInfo))
}
def withDependencies(dependencies: Vector[sbt.librarymanagement.ModuleID]): GetClassifiersModule = {
copy(dependencies = dependencies)
}
def withConfigurations(configurations: Vector[sbt.librarymanagement.Configuration]): GetClassifiersModule = {
copy(configurations = configurations)
}
def withClassifiers(classifiers: Vector[String]): GetClassifiersModule = {
copy(classifiers = classifiers)
}
}
object GetClassifiersModule {
def apply(id: sbt.librarymanagement.ModuleID, scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo], dependencies: Vector[sbt.librarymanagement.ModuleID], configurations: Vector[sbt.librarymanagement.Configuration], classifiers: Vector[String]): GetClassifiersModule = new GetClassifiersModule(id, scalaModuleInfo, dependencies, configurations, classifiers)
def apply(id: sbt.librarymanagement.ModuleID, scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo, dependencies: Vector[sbt.librarymanagement.ModuleID], configurations: Vector[sbt.librarymanagement.Configuration], classifiers: Vector[String]): GetClassifiersModule = new GetClassifiersModule(id, Option(scalaModuleInfo), dependencies, configurations, classifiers)
}

View File

@ -0,0 +1,35 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait GetClassifiersModuleFormats { self: sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ScalaModuleInfoFormats with sbt.librarymanagement.ConfigurationFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val GetClassifiersModuleFormat: JsonFormat[sbt.librarymanagement.GetClassifiersModule] = new JsonFormat[sbt.librarymanagement.GetClassifiersModule] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.GetClassifiersModule = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val id = unbuilder.readField[sbt.librarymanagement.ModuleID]("id")
val scalaModuleInfo = unbuilder.readField[Option[sbt.librarymanagement.ScalaModuleInfo]]("scalaModuleInfo")
val dependencies = unbuilder.readField[Vector[sbt.librarymanagement.ModuleID]]("dependencies")
val configurations = unbuilder.readField[Vector[sbt.librarymanagement.Configuration]]("configurations")
val classifiers = unbuilder.readField[Vector[String]]("classifiers")
unbuilder.endObject()
sbt.librarymanagement.GetClassifiersModule(id, scalaModuleInfo, dependencies, configurations, classifiers)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.librarymanagement.GetClassifiersModule, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("id", obj.id)
builder.addField("scalaModuleInfo", obj.scalaModuleInfo)
builder.addField("dependencies", obj.dependencies)
builder.addField("configurations", obj.configurations)
builder.addField("classifiers", obj.classifiers)
builder.endObject()
}
}
}

View File

@ -0,0 +1,49 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class IvyFileConfiguration private (
validate: Boolean,
scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo],
val file: java.io.File,
val autoScalaTools: Boolean) extends sbt.librarymanagement.ModuleSettings(validate, scalaModuleInfo) with Serializable {
private def this(file: java.io.File, autoScalaTools: Boolean) = this(false, None, file, autoScalaTools)
override def equals(o: Any): Boolean = o match {
case x: IvyFileConfiguration => (this.validate == x.validate) && (this.scalaModuleInfo == x.scalaModuleInfo) && (this.file == x.file) && (this.autoScalaTools == x.autoScalaTools)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (17 + "IvyFileConfiguration".##) + validate.##) + scalaModuleInfo.##) + file.##) + autoScalaTools.##)
}
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 = {
new IvyFileConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
}
def withValidate(validate: Boolean): IvyFileConfiguration = {
copy(validate = validate)
}
def withScalaModuleInfo(scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo]): IvyFileConfiguration = {
copy(scalaModuleInfo = scalaModuleInfo)
}
def withScalaModuleInfo(scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo): IvyFileConfiguration = {
copy(scalaModuleInfo = Option(scalaModuleInfo))
}
def withFile(file: java.io.File): IvyFileConfiguration = {
copy(file = file)
}
def withAutoScalaTools(autoScalaTools: Boolean): IvyFileConfiguration = {
copy(autoScalaTools = autoScalaTools)
}
}
object IvyFileConfiguration {
def apply(file: java.io.File, autoScalaTools: Boolean): IvyFileConfiguration = new IvyFileConfiguration(false, None, 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)
}

View File

@ -5,18 +5,18 @@
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait IvyFileConfigurationFormats { self: sbt.librarymanagement.IvyScalaFormats with sjsonnew.BasicJsonProtocol =>
trait IvyFileConfigurationFormats { self: sbt.librarymanagement.ScalaModuleInfoFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val IvyFileConfigurationFormat: JsonFormat[sbt.librarymanagement.IvyFileConfiguration] = new JsonFormat[sbt.librarymanagement.IvyFileConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.IvyFileConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val validate = unbuilder.readField[Boolean]("validate")
val ivyScala = unbuilder.readField[Option[sbt.librarymanagement.IvyScala]]("ivyScala")
val scalaModuleInfo = unbuilder.readField[Option[sbt.librarymanagement.ScalaModuleInfo]]("scalaModuleInfo")
val file = unbuilder.readField[java.io.File]("file")
val autoScalaTools = unbuilder.readField[Boolean]("autoScalaTools")
unbuilder.endObject()
sbt.librarymanagement.IvyFileConfiguration(validate, ivyScala, file, autoScalaTools)
sbt.librarymanagement.IvyFileConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
case None =>
deserializationError("Expected JsObject but found None")
}
@ -24,7 +24,7 @@ implicit lazy val IvyFileConfigurationFormat: JsonFormat[sbt.librarymanagement.I
override def write[J](obj: sbt.librarymanagement.IvyFileConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("validate", obj.validate)
builder.addField("ivyScala", obj.ivyScala)
builder.addField("scalaModuleInfo", obj.scalaModuleInfo)
builder.addField("file", obj.file)
builder.addField("autoScalaTools", obj.autoScalaTools)
builder.endObject()

View File

@ -6,9 +6,13 @@
package sbt.librarymanagement
trait LibraryManagementCodec extends sjsonnew.BasicJsonProtocol
with sbt.librarymanagement.ConfigRefFormats
with sbt.librarymanagement.RetrieveConfigurationFormats
with sbt.librarymanagement.UpdateLoggingFormats
with sbt.internal.librarymanagement.formats.LogicalClockFormats
with sbt.librarymanagement.ArtifactTypeFilterFormats
with sbt.librarymanagement.UpdateConfigurationFormats
with sbt.librarymanagement.ChecksumFormats
with sbt.librarymanagement.ArtifactFormats
with sbt.librarymanagement.ArtifactTypeFilterFormats
with sbt.librarymanagement.DisabledFormats
with sbt.librarymanagement.BinaryFormats
with sbt.librarymanagement.ConstantFormats
@ -17,6 +21,11 @@ trait LibraryManagementCodec extends sjsonnew.BasicJsonProtocol
with sbt.librarymanagement.CrossVersionFormats
with sbt.librarymanagement.InclExclRuleFormats
with sbt.librarymanagement.ModuleIDFormats
with sbt.librarymanagement.ConfigurationFormats
with sbt.librarymanagement.ScalaModuleInfoFormats
with sbt.librarymanagement.GetClassifiersModuleFormats
with sbt.librarymanagement.GetClassifiersConfigurationFormats
with sbt.librarymanagement.PublishConfigurationFormats
with sbt.librarymanagement.CallerFormats
with sbt.librarymanagement.ModuleReportFormats
with sbt.librarymanagement.OrganizationArtifactReportFormats
@ -24,8 +33,6 @@ trait LibraryManagementCodec extends sjsonnew.BasicJsonProtocol
with sbt.librarymanagement.ConflictManagerFormats
with sbt.librarymanagement.DeveloperFormats
with sbt.librarymanagement.FileConfigurationFormats
with sbt.librarymanagement.ConfigurationFormats
with sbt.librarymanagement.IvyScalaFormats
with sbt.librarymanagement.ChainedResolverFormats
with sbt.librarymanagement.MavenRepoFormats
with sbt.librarymanagement.MavenCacheFormats
@ -45,23 +52,13 @@ trait LibraryManagementCodec extends sjsonnew.BasicJsonProtocol
with sbt.librarymanagement.IvyFileConfigurationFormats
with sbt.librarymanagement.PomConfigurationFormats
with sbt.internal.librarymanagement.formats.NodeSeqFormat
with sbt.librarymanagement.InlineConfigurationFormats
with sbt.librarymanagement.ModuleDescriptorConfigurationFormats
with sbt.librarymanagement.ModuleSettingsFormats
with sbt.librarymanagement.MavenRepositoryFormats
with sbt.librarymanagement.PatternsBasedRepositoryFormats
with sbt.librarymanagement.SshBasedRepositoryFormats
with sbt.librarymanagement.RetrieveConfigurationFormats
with sbt.librarymanagement.UpdateLoggingFormats
with sbt.librarymanagement.UpdateConfigurationFormats
with sbt.librarymanagement.UpdateStatsFormats
with sbt.librarymanagement.UpdateReportFormats
with sbt.librarymanagement.ConfigurationReportLiteFormats
with sbt.internal.librarymanagement.formats.GlobalLockFormat
with sbt.internal.librarymanagement.formats.LoggerFormat
with sbt.internal.librarymanagement.formats.UpdateOptionsFormat
with sbt.librarymanagement.IvyPathsFormats
with sbt.librarymanagement.InlineIvyConfigurationFormats
with sbt.librarymanagement.ExternalIvyConfigurationFormats
with sbt.librarymanagement.IvyConfigurationFormats
with sbt.librarymanagement.UpdateReportLiteFormats
object LibraryManagementCodec extends LibraryManagementCodec

View File

@ -0,0 +1,80 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class ModuleDescriptorConfiguration private (
validate: Boolean,
scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo],
val module: sbt.librarymanagement.ModuleID,
val moduleInfo: sbt.librarymanagement.ModuleInfo,
val dependencies: Vector[sbt.librarymanagement.ModuleID],
val overrides: Vector[sbt.librarymanagement.ModuleID],
val excludes: Vector[sbt.librarymanagement.InclExclRule],
val ivyXML: scala.xml.NodeSeq,
val configurations: Vector[sbt.librarymanagement.Configuration],
val defaultConfiguration: Option[sbt.librarymanagement.Configuration],
val conflictManager: sbt.librarymanagement.ConflictManager) extends sbt.librarymanagement.ModuleSettings(validate, scalaModuleInfo) with Serializable {
private def this(module: sbt.librarymanagement.ModuleID, moduleInfo: sbt.librarymanagement.ModuleInfo) = this(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)
override def equals(o: Any): Boolean = o match {
case x: ModuleDescriptorConfiguration => (this.validate == x.validate) && (this.scalaModuleInfo == x.scalaModuleInfo) && (this.module == x.module) && (this.moduleInfo == x.moduleInfo) && (this.dependencies == x.dependencies) && (this.overrides == x.overrides) && (this.excludes == x.excludes) && (this.ivyXML == x.ivyXML) && (this.configurations == x.configurations) && (this.defaultConfiguration == x.defaultConfiguration) && (this.conflictManager == x.conflictManager)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "ModuleDescriptorConfiguration".##) + validate.##) + scalaModuleInfo.##) + module.##) + moduleInfo.##) + dependencies.##) + overrides.##) + excludes.##) + ivyXML.##) + configurations.##) + defaultConfiguration.##) + conflictManager.##)
}
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 = {
new ModuleDescriptorConfiguration(validate, scalaModuleInfo, module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, defaultConfiguration, conflictManager)
}
def withValidate(validate: Boolean): ModuleDescriptorConfiguration = {
copy(validate = validate)
}
def withScalaModuleInfo(scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo]): ModuleDescriptorConfiguration = {
copy(scalaModuleInfo = scalaModuleInfo)
}
def withScalaModuleInfo(scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo): ModuleDescriptorConfiguration = {
copy(scalaModuleInfo = Option(scalaModuleInfo))
}
def withModule(module: sbt.librarymanagement.ModuleID): ModuleDescriptorConfiguration = {
copy(module = module)
}
def withModuleInfo(moduleInfo: sbt.librarymanagement.ModuleInfo): ModuleDescriptorConfiguration = {
copy(moduleInfo = moduleInfo)
}
def withDependencies(dependencies: Vector[sbt.librarymanagement.ModuleID]): ModuleDescriptorConfiguration = {
copy(dependencies = dependencies)
}
def withOverrides(overrides: Vector[sbt.librarymanagement.ModuleID]): ModuleDescriptorConfiguration = {
copy(overrides = overrides)
}
def withExcludes(excludes: Vector[sbt.librarymanagement.InclExclRule]): ModuleDescriptorConfiguration = {
copy(excludes = excludes)
}
def withIvyXML(ivyXML: scala.xml.NodeSeq): ModuleDescriptorConfiguration = {
copy(ivyXML = ivyXML)
}
def withConfigurations(configurations: Vector[sbt.librarymanagement.Configuration]): ModuleDescriptorConfiguration = {
copy(configurations = configurations)
}
def withDefaultConfiguration(defaultConfiguration: Option[sbt.librarymanagement.Configuration]): ModuleDescriptorConfiguration = {
copy(defaultConfiguration = defaultConfiguration)
}
def withDefaultConfiguration(defaultConfiguration: sbt.librarymanagement.Configuration): ModuleDescriptorConfiguration = {
copy(defaultConfiguration = Option(defaultConfiguration))
}
def withConflictManager(conflictManager: sbt.librarymanagement.ConflictManager): ModuleDescriptorConfiguration = {
copy(conflictManager = conflictManager)
}
}
object ModuleDescriptorConfiguration extends sbt.internal.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(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)
}

View File

@ -5,33 +5,33 @@
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait InlineConfigurationFormats { self: sbt.librarymanagement.IvyScalaFormats with sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ModuleInfoFormats with sbt.librarymanagement.InclExclRuleFormats with sbt.internal.librarymanagement.formats.NodeSeqFormat with sbt.librarymanagement.ConfigurationFormats with sbt.librarymanagement.ConflictManagerFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val InlineConfigurationFormat: JsonFormat[sbt.internal.librarymanagement.InlineConfiguration] = new JsonFormat[sbt.internal.librarymanagement.InlineConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.librarymanagement.InlineConfiguration = {
trait ModuleDescriptorConfigurationFormats { self: sbt.librarymanagement.ScalaModuleInfoFormats with sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ModuleInfoFormats with sbt.librarymanagement.InclExclRuleFormats with sbt.internal.librarymanagement.formats.NodeSeqFormat with sbt.librarymanagement.ConfigurationFormats with sbt.librarymanagement.ConflictManagerFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val ModuleDescriptorConfigurationFormat: JsonFormat[sbt.librarymanagement.ModuleDescriptorConfiguration] = new JsonFormat[sbt.librarymanagement.ModuleDescriptorConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.ModuleDescriptorConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val validate = unbuilder.readField[Boolean]("validate")
val ivyScala = unbuilder.readField[Option[sbt.librarymanagement.IvyScala]]("ivyScala")
val scalaModuleInfo = unbuilder.readField[Option[sbt.librarymanagement.ScalaModuleInfo]]("scalaModuleInfo")
val module = unbuilder.readField[sbt.librarymanagement.ModuleID]("module")
val moduleInfo = unbuilder.readField[sbt.librarymanagement.ModuleInfo]("moduleInfo")
val dependencies = unbuilder.readField[Vector[sbt.librarymanagement.ModuleID]]("dependencies")
val overrides = unbuilder.readField[Set[sbt.librarymanagement.ModuleID]]("overrides")
val overrides = unbuilder.readField[Vector[sbt.librarymanagement.ModuleID]]("overrides")
val excludes = unbuilder.readField[Vector[sbt.librarymanagement.InclExclRule]]("excludes")
val ivyXML = unbuilder.readField[scala.xml.NodeSeq]("ivyXML")
val configurations = unbuilder.readField[Vector[sbt.librarymanagement.Configuration]]("configurations")
val defaultConfiguration = unbuilder.readField[Option[sbt.librarymanagement.Configuration]]("defaultConfiguration")
val conflictManager = unbuilder.readField[sbt.librarymanagement.ConflictManager]("conflictManager")
unbuilder.endObject()
sbt.internal.librarymanagement.InlineConfiguration(validate, ivyScala, module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, defaultConfiguration, conflictManager)
sbt.librarymanagement.ModuleDescriptorConfiguration(validate, scalaModuleInfo, module, moduleInfo, dependencies, overrides, excludes, ivyXML, configurations, defaultConfiguration, conflictManager)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.internal.librarymanagement.InlineConfiguration, builder: Builder[J]): Unit = {
override def write[J](obj: sbt.librarymanagement.ModuleDescriptorConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("validate", obj.validate)
builder.addField("ivyScala", obj.ivyScala)
builder.addField("scalaModuleInfo", obj.scalaModuleInfo)
builder.addField("module", obj.module)
builder.addField("moduleInfo", obj.moduleInfo)
builder.addField("dependencies", obj.dependencies)

View File

@ -6,20 +6,20 @@
package sbt.librarymanagement
abstract class ModuleSettings(
val validate: Boolean,
val ivyScala: Option[sbt.librarymanagement.IvyScala]) extends Serializable {
val scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo]) extends Serializable {
def this() = this(false, None)
override def equals(o: Any): Boolean = o match {
case x: ModuleSettings => (this.validate == x.validate) && (this.ivyScala == x.ivyScala)
case x: ModuleSettings => (this.validate == x.validate) && (this.scalaModuleInfo == x.scalaModuleInfo)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (17 + "ModuleSettings".##) + validate.##) + ivyScala.##)
37 * (37 * (37 * (17 + "ModuleSettings".##) + validate.##) + scalaModuleInfo.##)
}
override def toString: String = {
"ModuleSettings(" + validate + ", " + ivyScala + ")"
"ModuleSettings(" + validate + ", " + scalaModuleInfo + ")"
}
}
object ModuleSettings {

View File

@ -0,0 +1,11 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.JsonFormat
trait ModuleSettingsFormats { self: sbt.librarymanagement.ScalaModuleInfoFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.IvyFileConfigurationFormats with sbt.librarymanagement.PomConfigurationFormats with sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ModuleInfoFormats with sbt.librarymanagement.InclExclRuleFormats with sbt.internal.librarymanagement.formats.NodeSeqFormat with sbt.librarymanagement.ConfigurationFormats with sbt.librarymanagement.ConflictManagerFormats with sbt.librarymanagement.ModuleDescriptorConfigurationFormats =>
implicit lazy val ModuleSettingsFormat: JsonFormat[sbt.librarymanagement.ModuleSettings] = flatUnionFormat3[sbt.librarymanagement.ModuleSettings, sbt.librarymanagement.IvyFileConfiguration, sbt.librarymanagement.PomConfiguration, sbt.librarymanagement.ModuleDescriptorConfiguration]("type")
}

View File

@ -0,0 +1,49 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class PomConfiguration private (
validate: Boolean,
scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo],
val file: java.io.File,
val autoScalaTools: Boolean) extends sbt.librarymanagement.ModuleSettings(validate, scalaModuleInfo) with Serializable {
private def this(file: java.io.File, autoScalaTools: Boolean) = this(false, None, file, autoScalaTools)
override def equals(o: Any): Boolean = o match {
case x: PomConfiguration => (this.validate == x.validate) && (this.scalaModuleInfo == x.scalaModuleInfo) && (this.file == x.file) && (this.autoScalaTools == x.autoScalaTools)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (17 + "PomConfiguration".##) + validate.##) + scalaModuleInfo.##) + file.##) + autoScalaTools.##)
}
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 = {
new PomConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
}
def withValidate(validate: Boolean): PomConfiguration = {
copy(validate = validate)
}
def withScalaModuleInfo(scalaModuleInfo: Option[sbt.librarymanagement.ScalaModuleInfo]): PomConfiguration = {
copy(scalaModuleInfo = scalaModuleInfo)
}
def withScalaModuleInfo(scalaModuleInfo: sbt.librarymanagement.ScalaModuleInfo): PomConfiguration = {
copy(scalaModuleInfo = Option(scalaModuleInfo))
}
def withFile(file: java.io.File): PomConfiguration = {
copy(file = file)
}
def withAutoScalaTools(autoScalaTools: Boolean): PomConfiguration = {
copy(autoScalaTools = autoScalaTools)
}
}
object PomConfiguration {
def apply(file: java.io.File, autoScalaTools: Boolean): PomConfiguration = new PomConfiguration(false, None, 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)
}

View File

@ -5,18 +5,18 @@
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait PomConfigurationFormats { self: sbt.librarymanagement.IvyScalaFormats with sjsonnew.BasicJsonProtocol =>
trait PomConfigurationFormats { self: sbt.librarymanagement.ScalaModuleInfoFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val PomConfigurationFormat: JsonFormat[sbt.librarymanagement.PomConfiguration] = new JsonFormat[sbt.librarymanagement.PomConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.PomConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val validate = unbuilder.readField[Boolean]("validate")
val ivyScala = unbuilder.readField[Option[sbt.librarymanagement.IvyScala]]("ivyScala")
val scalaModuleInfo = unbuilder.readField[Option[sbt.librarymanagement.ScalaModuleInfo]]("scalaModuleInfo")
val file = unbuilder.readField[java.io.File]("file")
val autoScalaTools = unbuilder.readField[Boolean]("autoScalaTools")
unbuilder.endObject()
sbt.librarymanagement.PomConfiguration(validate, ivyScala, file, autoScalaTools)
sbt.librarymanagement.PomConfiguration(validate, scalaModuleInfo, file, autoScalaTools)
case None =>
deserializationError("Expected JsObject but found None")
}
@ -24,7 +24,7 @@ implicit lazy val PomConfigurationFormat: JsonFormat[sbt.librarymanagement.PomCo
override def write[J](obj: sbt.librarymanagement.PomConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("validate", obj.validate)
builder.addField("ivyScala", obj.ivyScala)
builder.addField("scalaModuleInfo", obj.scalaModuleInfo)
builder.addField("file", obj.file)
builder.addField("autoScalaTools", obj.autoScalaTools)
builder.endObject()

View File

@ -0,0 +1,81 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class PublishConfiguration private (
val publishMavenStyle: Boolean,
val deliverIvyPattern: Option[String],
val status: Option[String],
val configurations: Option[scala.Vector[sbt.librarymanagement.ConfigRef]],
val resolverName: Option[String],
val artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]],
val checksums: scala.Vector[String],
val logging: Option[sbt.librarymanagement.UpdateLogging],
val overwrite: Boolean) extends Serializable {
private def this() = this(true, None, None, None, None, Vector(), Vector("sha1", "md5"), None, false)
override def equals(o: Any): Boolean = o match {
case x: PublishConfiguration => (this.publishMavenStyle == x.publishMavenStyle) && (this.deliverIvyPattern == x.deliverIvyPattern) && (this.status == x.status) && (this.configurations == x.configurations) && (this.resolverName == x.resolverName) && (this.artifacts == x.artifacts) && (this.checksums == x.checksums) && (this.logging == x.logging) && (this.overwrite == x.overwrite)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "PublishConfiguration".##) + publishMavenStyle.##) + deliverIvyPattern.##) + status.##) + configurations.##) + resolverName.##) + artifacts.##) + checksums.##) + logging.##) + overwrite.##)
}
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 = {
new PublishConfiguration(publishMavenStyle, deliverIvyPattern, status, configurations, resolverName, artifacts, checksums, logging, overwrite)
}
def withPublishMavenStyle(publishMavenStyle: Boolean): PublishConfiguration = {
copy(publishMavenStyle = publishMavenStyle)
}
def withDeliverIvyPattern(deliverIvyPattern: Option[String]): PublishConfiguration = {
copy(deliverIvyPattern = deliverIvyPattern)
}
def withDeliverIvyPattern(deliverIvyPattern: String): PublishConfiguration = {
copy(deliverIvyPattern = Option(deliverIvyPattern))
}
def withStatus(status: Option[String]): PublishConfiguration = {
copy(status = status)
}
def withStatus(status: String): PublishConfiguration = {
copy(status = Option(status))
}
def withConfigurations(configurations: Option[scala.Vector[sbt.librarymanagement.ConfigRef]]): PublishConfiguration = {
copy(configurations = configurations)
}
def withConfigurations(configurations: scala.Vector[sbt.librarymanagement.ConfigRef]): PublishConfiguration = {
copy(configurations = Option(configurations))
}
def withResolverName(resolverName: Option[String]): PublishConfiguration = {
copy(resolverName = resolverName)
}
def withResolverName(resolverName: String): PublishConfiguration = {
copy(resolverName = Option(resolverName))
}
def withArtifacts(artifacts: Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]]): PublishConfiguration = {
copy(artifacts = artifacts)
}
def withChecksums(checksums: scala.Vector[String]): PublishConfiguration = {
copy(checksums = checksums)
}
def withLogging(logging: Option[sbt.librarymanagement.UpdateLogging]): PublishConfiguration = {
copy(logging = logging)
}
def withLogging(logging: sbt.librarymanagement.UpdateLogging): PublishConfiguration = {
copy(logging = Option(logging))
}
def withOverwrite(overwrite: Boolean): PublishConfiguration = {
copy(overwrite = overwrite)
}
}
object PublishConfiguration {
def apply(): PublishConfiguration = new PublishConfiguration(true, None, None, None, None, Vector(), Vector("sha1", "md5"), None, false)
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)
}

View File

@ -0,0 +1,43 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait PublishConfigurationFormats { self: sbt.librarymanagement.ConfigRefFormats with sbt.librarymanagement.ArtifactFormats with sbt.librarymanagement.UpdateLoggingFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val PublishConfigurationFormat: JsonFormat[sbt.librarymanagement.PublishConfiguration] = new JsonFormat[sbt.librarymanagement.PublishConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.PublishConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val publishMavenStyle = unbuilder.readField[Boolean]("publishMavenStyle")
val deliverIvyPattern = unbuilder.readField[Option[String]]("deliverIvyPattern")
val status = unbuilder.readField[Option[String]]("status")
val configurations = unbuilder.readField[Option[scala.Vector[sbt.librarymanagement.ConfigRef]]]("configurations")
val resolverName = unbuilder.readField[Option[String]]("resolverName")
val artifacts = unbuilder.readField[Vector[scala.Tuple2[sbt.librarymanagement.Artifact, java.io.File]]]("artifacts")
val checksums = unbuilder.readField[scala.Vector[String]]("checksums")
val logging = unbuilder.readField[Option[sbt.librarymanagement.UpdateLogging]]("logging")
val overwrite = unbuilder.readField[Boolean]("overwrite")
unbuilder.endObject()
sbt.librarymanagement.PublishConfiguration(publishMavenStyle, deliverIvyPattern, status, configurations, resolverName, artifacts, checksums, logging, overwrite)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.librarymanagement.PublishConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("publishMavenStyle", obj.publishMavenStyle)
builder.addField("deliverIvyPattern", obj.deliverIvyPattern)
builder.addField("status", obj.status)
builder.addField("configurations", obj.configurations)
builder.addField("resolverName", obj.resolverName)
builder.addField("artifacts", obj.artifacts)
builder.addField("checksums", obj.checksums)
builder.addField("logging", obj.logging)
builder.addField("overwrite", obj.overwrite)
builder.endObject()
}
}
}

View File

@ -0,0 +1,58 @@
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class RetrieveConfiguration private (
val retrieveDirectory: Option[java.io.File],
val outputPattern: Option[String],
val sync: Boolean,
val configurationsToRetrieve: Option[scala.Vector[sbt.librarymanagement.ConfigRef]]) extends Serializable {
private def this() = this(None, None, false, None)
private def this(retrieveDirectory: Option[java.io.File], outputPattern: Option[String]) = this(retrieveDirectory, outputPattern, false, None)
override def equals(o: Any): Boolean = o match {
case x: RetrieveConfiguration => (this.retrieveDirectory == x.retrieveDirectory) && (this.outputPattern == x.outputPattern) && (this.sync == x.sync) && (this.configurationsToRetrieve == x.configurationsToRetrieve)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (17 + "RetrieveConfiguration".##) + retrieveDirectory.##) + outputPattern.##) + sync.##) + configurationsToRetrieve.##)
}
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 = {
new RetrieveConfiguration(retrieveDirectory, outputPattern, sync, configurationsToRetrieve)
}
def withRetrieveDirectory(retrieveDirectory: Option[java.io.File]): RetrieveConfiguration = {
copy(retrieveDirectory = retrieveDirectory)
}
def withRetrieveDirectory(retrieveDirectory: java.io.File): RetrieveConfiguration = {
copy(retrieveDirectory = Option(retrieveDirectory))
}
def withOutputPattern(outputPattern: Option[String]): RetrieveConfiguration = {
copy(outputPattern = outputPattern)
}
def withOutputPattern(outputPattern: String): RetrieveConfiguration = {
copy(outputPattern = Option(outputPattern))
}
def withSync(sync: Boolean): RetrieveConfiguration = {
copy(sync = sync)
}
def withConfigurationsToRetrieve(configurationsToRetrieve: Option[scala.Vector[sbt.librarymanagement.ConfigRef]]): RetrieveConfiguration = {
copy(configurationsToRetrieve = configurationsToRetrieve)
}
def withConfigurationsToRetrieve(configurationsToRetrieve: scala.Vector[sbt.librarymanagement.ConfigRef]): RetrieveConfiguration = {
copy(configurationsToRetrieve = Option(configurationsToRetrieve))
}
}
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(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))
}

View File

@ -6,22 +6,22 @@
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait RetrieveConfigurationFormats { self: sbt.librarymanagement.ConfigRefFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val RetrieveConfigurationFormat: JsonFormat[sbt.internal.librarymanagement.RetrieveConfiguration] = new JsonFormat[sbt.internal.librarymanagement.RetrieveConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.librarymanagement.RetrieveConfiguration = {
implicit lazy val RetrieveConfigurationFormat: JsonFormat[sbt.librarymanagement.RetrieveConfiguration] = new JsonFormat[sbt.librarymanagement.RetrieveConfiguration] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.RetrieveConfiguration = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val retrieveDirectory = unbuilder.readField[java.io.File]("retrieveDirectory")
val outputPattern = unbuilder.readField[String]("outputPattern")
val retrieveDirectory = unbuilder.readField[Option[java.io.File]]("retrieveDirectory")
val outputPattern = unbuilder.readField[Option[String]]("outputPattern")
val sync = unbuilder.readField[Boolean]("sync")
val configurationsToRetrieve = unbuilder.readField[Option[Set[sbt.librarymanagement.ConfigRef]]]("configurationsToRetrieve")
val configurationsToRetrieve = unbuilder.readField[Option[scala.Vector[sbt.librarymanagement.ConfigRef]]]("configurationsToRetrieve")
unbuilder.endObject()
sbt.internal.librarymanagement.RetrieveConfiguration(retrieveDirectory, outputPattern, sync, configurationsToRetrieve)
sbt.librarymanagement.RetrieveConfiguration(retrieveDirectory, outputPattern, sync, configurationsToRetrieve)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.internal.librarymanagement.RetrieveConfiguration, builder: Builder[J]): Unit = {
override def write[J](obj: sbt.librarymanagement.RetrieveConfiguration, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("retrieveDirectory", obj.retrieveDirectory)
builder.addField("outputPattern", obj.outputPattern)

View File

@ -4,7 +4,7 @@
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
final class IvyScala private (
final class ScalaModuleInfo private (
val scalaFullVersion: String,
val scalaBinaryVersion: String,
val configurations: Vector[sbt.librarymanagement.Configuration],
@ -17,45 +17,45 @@ final class IvyScala private (
private def this(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Vector[sbt.librarymanagement.Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean) = this(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, sbt.librarymanagement.ScalaArtifacts.Organization, sbt.librarymanagement.ScalaArtifacts.Artifacts)
override def equals(o: Any): Boolean = o match {
case x: IvyScala => (this.scalaFullVersion == x.scalaFullVersion) && (this.scalaBinaryVersion == x.scalaBinaryVersion) && (this.configurations == x.configurations) && (this.checkExplicit == x.checkExplicit) && (this.filterImplicit == x.filterImplicit) && (this.overrideScalaVersion == x.overrideScalaVersion) && (this.scalaOrganization == x.scalaOrganization) && (this.scalaArtifacts == x.scalaArtifacts)
case x: ScalaModuleInfo => (this.scalaFullVersion == x.scalaFullVersion) && (this.scalaBinaryVersion == x.scalaBinaryVersion) && (this.configurations == x.configurations) && (this.checkExplicit == x.checkExplicit) && (this.filterImplicit == x.filterImplicit) && (this.overrideScalaVersion == x.overrideScalaVersion) && (this.scalaOrganization == x.scalaOrganization) && (this.scalaArtifacts == x.scalaArtifacts)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "IvyScala".##) + scalaFullVersion.##) + scalaBinaryVersion.##) + configurations.##) + checkExplicit.##) + filterImplicit.##) + overrideScalaVersion.##) + scalaOrganization.##) + scalaArtifacts.##)
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "ScalaModuleInfo".##) + scalaFullVersion.##) + scalaBinaryVersion.##) + configurations.##) + checkExplicit.##) + filterImplicit.##) + overrideScalaVersion.##) + scalaOrganization.##) + scalaArtifacts.##)
}
override def toString: String = {
"IvyScala(" + scalaFullVersion + ", " + scalaBinaryVersion + ", " + configurations + ", " + checkExplicit + ", " + filterImplicit + ", " + overrideScalaVersion + ", " + scalaOrganization + ", " + scalaArtifacts + ")"
"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): IvyScala = {
new IvyScala(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 = {
new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
}
def withScalaFullVersion(scalaFullVersion: String): IvyScala = {
def withScalaFullVersion(scalaFullVersion: String): ScalaModuleInfo = {
copy(scalaFullVersion = scalaFullVersion)
}
def withScalaBinaryVersion(scalaBinaryVersion: String): IvyScala = {
def withScalaBinaryVersion(scalaBinaryVersion: String): ScalaModuleInfo = {
copy(scalaBinaryVersion = scalaBinaryVersion)
}
def withConfigurations(configurations: Vector[sbt.librarymanagement.Configuration]): IvyScala = {
def withConfigurations(configurations: Vector[sbt.librarymanagement.Configuration]): ScalaModuleInfo = {
copy(configurations = configurations)
}
def withCheckExplicit(checkExplicit: Boolean): IvyScala = {
def withCheckExplicit(checkExplicit: Boolean): ScalaModuleInfo = {
copy(checkExplicit = checkExplicit)
}
def withFilterImplicit(filterImplicit: Boolean): IvyScala = {
def withFilterImplicit(filterImplicit: Boolean): ScalaModuleInfo = {
copy(filterImplicit = filterImplicit)
}
def withOverrideScalaVersion(overrideScalaVersion: Boolean): IvyScala = {
def withOverrideScalaVersion(overrideScalaVersion: Boolean): ScalaModuleInfo = {
copy(overrideScalaVersion = overrideScalaVersion)
}
def withScalaOrganization(scalaOrganization: String): IvyScala = {
def withScalaOrganization(scalaOrganization: String): ScalaModuleInfo = {
copy(scalaOrganization = scalaOrganization)
}
def withScalaArtifacts(scalaArtifacts: scala.Vector[String]): IvyScala = {
def withScalaArtifacts(scalaArtifacts: scala.Vector[String]): ScalaModuleInfo = {
copy(scalaArtifacts = scalaArtifacts)
}
}
object IvyScala extends sbt.librarymanagement.IvyScalaFunctions {
object ScalaModuleInfo {
def apply(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Vector[sbt.librarymanagement.Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean): IvyScala = new IvyScala(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, scalaOrganization: String, scalaArtifacts: scala.Vector[String]): IvyScala = new IvyScala(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
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, scalaOrganization: String, scalaArtifacts: scala.Vector[String]): ScalaModuleInfo = new ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
}

View File

@ -5,9 +5,9 @@
// DO NOT EDIT MANUALLY
package sbt.librarymanagement
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait IvyScalaFormats { self: sbt.librarymanagement.ConfigurationFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val IvyScalaFormat: JsonFormat[sbt.librarymanagement.IvyScala] = new JsonFormat[sbt.librarymanagement.IvyScala] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.IvyScala = {
trait ScalaModuleInfoFormats { self: sbt.librarymanagement.ConfigurationFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val ScalaModuleInfoFormat: JsonFormat[sbt.librarymanagement.ScalaModuleInfo] = new JsonFormat[sbt.librarymanagement.ScalaModuleInfo] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.ScalaModuleInfo = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
@ -20,12 +20,12 @@ implicit lazy val IvyScalaFormat: JsonFormat[sbt.librarymanagement.IvyScala] = n
val scalaOrganization = unbuilder.readField[String]("scalaOrganization")
val scalaArtifacts = unbuilder.readField[scala.Vector[String]]("scalaArtifacts")
unbuilder.endObject()
sbt.librarymanagement.IvyScala(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
sbt.librarymanagement.ScalaModuleInfo(scalaFullVersion, scalaBinaryVersion, configurations, checkExplicit, filterImplicit, overrideScalaVersion, scalaOrganization, scalaArtifacts)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.librarymanagement.IvyScala, builder: Builder[J]): Unit = {
override def write[J](obj: sbt.librarymanagement.ScalaModuleInfo, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("scalaFullVersion", obj.scalaFullVersion)
builder.addField("scalaBinaryVersion", obj.scalaBinaryVersion)

Some files were not shown because too many files have changed in this diff Show More