Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] upgrade and reenable sbt'contraband plugin #454

Merged
merged 4 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ lazy val lmRoot = (project in file("."))
)

lazy val lmCore = (project in file("core"))
// .enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.settings(
commonSettings,
name := "librarymanagement-core",
Expand Down Expand Up @@ -143,7 +143,7 @@ lazy val lmCore = (project in file("core"))
case v if v.startsWith("2.12.") => List("-Ywarn-unused:-locals,-explicits,-privates")
case _ => List()
}),
Compile / unmanagedSourceDirectories +=
Compile / managedSourceDirectories +=
baseDirectory.value / "src" / "main" / "contraband-scala",
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "contraband-scala",
Compile / generateContrabands / contrabandFormatsForType := DatatypeConfig.getFormats,
Expand Down Expand Up @@ -274,7 +274,7 @@ lazy val lmCore = (project in file("core"))
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache, addSbtCompilerInterface)

lazy val lmIvy = (project in file("ivy"))
// .enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
.dependsOn(lmCore)
.settings(
commonSettings,
Expand All @@ -288,7 +288,7 @@ lazy val lmIvy = (project in file("ivy"))
scalaCheck % Test,
scalaVerify % Test,
),
Compile / unmanagedSourceDirectories +=
Compile / managedSourceDirectories +=
baseDirectory.value / "src" / "main" / "contraband-scala",
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "contraband-scala",
Compile / generateContrabands / contrabandFormatsForType := DatatypeConfig.getFormats,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -20,7 +20,7 @@ final class ConfigurationReportLite private (
override def toString: String = {
"ConfigurationReportLite(" + configuration + ", " + details + ")"
}
private[this] def copy(configuration: String = configuration, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReportLite = {
private def copy(configuration: String = configuration, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReportLite = {
new ConfigurationReportLite(configuration, details)
}
def withConfiguration(configuration: String): ConfigurationReportLite = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -12,15 +12,15 @@ final class SemComparator private (
val tags: Seq[String]) extends sbt.internal.librarymanagement.SemComparatorExtra with Serializable {
def matches(version: sbt.librarymanagement.VersionNumber): Boolean = this.matchesImpl(version)
def expandWildcard: Seq[SemComparator] = {
if (op == sbt.internal.librarymanagement.SemSelOperator.Eq && !allFieldsSpecified) {
Seq(
this.withOp(sbt.internal.librarymanagement.SemSelOperator.Gte),
this.withOp(sbt.internal.librarymanagement.SemSelOperator.Lte)
)
} else { Seq(this) }
}


if (op == sbt.internal.librarymanagement.SemSelOperator.Eq && !allFieldsSpecified)
Seq(
this.withOp(sbt.internal.librarymanagement.SemSelOperator.Gte),
this.withOp(sbt.internal.librarymanagement.SemSelOperator.Lte)
)
else Seq(this)
}
override def equals(o: Any): Boolean = this.eq(o.asInstanceOf[AnyRef]) || (o match {
case x: SemComparator => (this.op == x.op) && (this.major == x.major) && (this.minor == x.minor) && (this.patch == x.patch) && (this.tags == x.tags)
case _ => false
Expand All @@ -31,7 +31,7 @@ final class SemComparator private (
override def toString: String = {
this.toStringImpl
}
private[this] def copy(op: sbt.internal.librarymanagement.SemSelOperator = op, major: Option[Long] = major, minor: Option[Long] = minor, patch: Option[Long] = patch, tags: Seq[String] = tags): SemComparator = {
private def copy(op: sbt.internal.librarymanagement.SemSelOperator = op, major: Option[Long] = major, minor: Option[Long] = minor, patch: Option[Long] = patch, tags: Seq[String] = tags): SemComparator = {
new SemComparator(op, major, minor, patch, tags)
}
def withOp(op: sbt.internal.librarymanagement.SemSelOperator): SemComparator = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -19,7 +19,7 @@ final class SemSelAndChunk private (
override def toString: String = {
comparators.map(_.toString).mkString(" ")
}
private[this] def copy(comparators: Seq[sbt.internal.librarymanagement.SemComparator] = comparators): SemSelAndChunk = {
private def copy(comparators: Seq[sbt.internal.librarymanagement.SemComparator] = comparators): SemSelAndChunk = {
new SemSelAndChunk(comparators)
}
def withComparators(comparators: Seq[sbt.internal.librarymanagement.SemComparator]): SemSelAndChunk = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -19,7 +19,7 @@ final class UpdateReportLite private (
override def toString: String = {
"UpdateReportLite(" + configurations + ")"
}
private[this] def copy(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite] = configurations): UpdateReportLite = {
private def copy(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite] = configurations): UpdateReportLite = {
new UpdateReportLite(configurations)
}
def withConfigurations(configurations: Vector[sbt.internal.librarymanagement.ConfigurationReportLite]): UpdateReportLite = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down Expand Up @@ -28,7 +28,7 @@ final class Artifact private (
override def toString: String = {
"Artifact(" + name + ", " + `type` + ", " + extension + ", " + classifier + ", " + configurations + ", " + url + ", " + extraAttributes + ", " + checksum + ", " + allowInsecureProtocol + ")"
}
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.URI] = url, extraAttributes: Map[String, String] = extraAttributes, checksum: Option[sbt.librarymanagement.Checksum] = checksum, allowInsecureProtocol: Boolean = allowInsecureProtocol): Artifact = {
private 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.URI] = url, extraAttributes: Map[String, String] = extraAttributes, checksum: Option[sbt.librarymanagement.Checksum] = checksum, allowInsecureProtocol: Boolean = allowInsecureProtocol): Artifact = {
new Artifact(name, `type`, extension, classifier, configurations, url, extraAttributes, checksum, allowInsecureProtocol)
}
def withName(name: String): Artifact = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down Expand Up @@ -27,7 +27,7 @@ final class ArtifactTypeFilter private (
override def toString: String = {
"ArtifactTypeFilter(" + types + ", " + inverted + ")"
}
private[this] def copy(types: Set[String] = types, inverted: Boolean = inverted): ArtifactTypeFilter = {
private def copy(types: Set[String] = types, inverted: Boolean = inverted): ArtifactTypeFilter = {
new ArtifactTypeFilter(types, inverted)
}
def withTypes(types: Set[String]): ArtifactTypeFilter = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -25,7 +25,7 @@ final class Caller private (
override def toString: String = {
s"$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 = {
private 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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -20,7 +20,7 @@ final class ChainedResolver private (
override def toString: String = {
"ChainedResolver(" + name + ", " + resolvers + ")"
}
private[this] def copy(name: String = name, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers): ChainedResolver = {
private def copy(name: String = name, resolvers: Vector[sbt.librarymanagement.Resolver] = resolvers): ChainedResolver = {
new ChainedResolver(name, resolvers)
}
def withName(name: String): ChainedResolver = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -20,7 +20,7 @@ final class Checksum private (
override def toString: String = {
"Checksum(" + digest + ", " + `type` + ")"
}
private[this] def copy(digest: String = digest, `type`: String = `type`): Checksum = {
private def copy(digest: String = digest, `type`: String = `type`): Checksum = {
new Checksum(digest, `type`)
}
def withDigest(digest: String): Checksum = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down Expand Up @@ -29,7 +29,7 @@ final class ConfigurationReport private (
(if (details.isEmpty) modules.mkString + details.flatMap(_.modules).filter(_.evicted).map("\t\t(EVICTED) " + _ + "\n").mkString
else details.mkString)
}
private[this] def copy(configuration: sbt.librarymanagement.ConfigRef = configuration, modules: Vector[sbt.librarymanagement.ModuleReport] = modules, details: Vector[sbt.librarymanagement.OrganizationArtifactReport] = details): ConfigurationReport = {
private 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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -22,7 +22,7 @@ final class ConflictManager private (
override def toString: String = {
"ConflictManager(" + name + ", " + organization + ", " + module + ")"
}
private[this] def copy(name: String = name, organization: String = organization, module: String = module): ConflictManager = {
private def copy(name: String = name, organization: String = organization, module: String = module): ConflictManager = {
new ConflictManager(name, organization, module)
}
def withName(name: String): ConflictManager = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -22,7 +22,7 @@ final class Developer private (
override def toString: String = {
"Developer(" + id + ", " + name + ", " + email + ", " + url + ")"
}
private[this] def copy(id: String = id, name: String = name, email: String = email, url: java.net.URI = url): Developer = {
private def copy(id: String = id, name: String = name, email: String = email, url: java.net.URI = url): Developer = {
new Developer(id, name, email, url)
}
def withId(id: String): Developer = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -21,7 +21,7 @@ final class FileConfiguration private (
override def toString: String = {
"FileConfiguration(" + isLocal + ", " + isTransactional + ")"
}
private[this] def copy(isLocal: Boolean = isLocal, isTransactional: Option[Boolean] = isTransactional): FileConfiguration = {
private def copy(isLocal: Boolean = isLocal, isTransactional: Option[Boolean] = isTransactional): FileConfiguration = {
new FileConfiguration(isLocal, isTransactional)
}
def withIsLocal(isLocal: Boolean): FileConfiguration = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -23,7 +23,7 @@ final class FileRepository private (
override def toString: String = {
"FileRepository(" + name + ", " + patterns + ", " + configuration + ")"
}
private[this] def copy(name: String = name, patterns: sbt.librarymanagement.Patterns = patterns, configuration: sbt.librarymanagement.FileConfiguration = configuration): FileRepository = {
private 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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand All @@ -23,7 +23,7 @@ final class GetClassifiersConfiguration private (
override def toString: String = {
"GetClassifiersConfiguration(" + module + ", " + excludes + ", " + updateConfiguration + ", " + sourceArtifactTypes + ", " + docArtifactTypes + ")"
}
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 = {
private 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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
* This code is generated using [[https://www.scala-sbt.org/contraband]].
*/

// DO NOT EDIT MANUALLY
Expand Down
Loading
Loading