Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23320e6
commit 572b38e
Showing
3 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
modules/coursier/jvm/src/main/contraband-scala/coursier/params/CacheParams.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. | ||
*/ | ||
|
||
// DO NOT EDIT MANUALLY | ||
package coursier.params | ||
final class CacheParams private ( | ||
val cacheLocation: java.io.File, | ||
val cachePolicies: Seq[coursier.cache.CachePolicy], | ||
val ttl: Option[scala.concurrent.duration.Duration], | ||
val parallel: Int, | ||
val checksum: Seq[Option[String]], | ||
val retryCount: Int, | ||
val cacheLocalArtifacts: Boolean, | ||
val followHttpToHttpsRedirections: Boolean) extends coursier.params.CacheParamsHelpers with Serializable { | ||
|
||
private def this() = this(coursier.cache.CacheDefaults.location, coursier.cache.CachePolicy.default, coursier.cache.CacheDefaults.ttl, coursier.cache.CacheDefaults.concurrentDownloadCount, coursier.cache.CacheDefaults.checksums, 1, false, true) | ||
|
||
override def equals(o: Any): Boolean = o match { | ||
case x: CacheParams => (this.cacheLocation == x.cacheLocation) && (this.cachePolicies == x.cachePolicies) && (this.ttl == x.ttl) && (this.parallel == x.parallel) && (this.checksum == x.checksum) && (this.retryCount == x.retryCount) && (this.cacheLocalArtifacts == x.cacheLocalArtifacts) && (this.followHttpToHttpsRedirections == x.followHttpToHttpsRedirections) | ||
case _ => false | ||
} | ||
override def hashCode: Int = { | ||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "coursier.params.CacheParams".##) + cacheLocation.##) + cachePolicies.##) + ttl.##) + parallel.##) + checksum.##) + retryCount.##) + cacheLocalArtifacts.##) + followHttpToHttpsRedirections.##) | ||
} | ||
override def toString: String = { | ||
"CacheParams(" + cacheLocation + ", " + cachePolicies + ", " + ttl + ", " + parallel + ", " + checksum + ", " + retryCount + ", " + cacheLocalArtifacts + ", " + followHttpToHttpsRedirections + ")" | ||
} | ||
private[this] def copy(cacheLocation: java.io.File = cacheLocation, cachePolicies: Seq[coursier.cache.CachePolicy] = cachePolicies, ttl: Option[scala.concurrent.duration.Duration] = ttl, parallel: Int = parallel, checksum: Seq[Option[String]] = checksum, retryCount: Int = retryCount, cacheLocalArtifacts: Boolean = cacheLocalArtifacts, followHttpToHttpsRedirections: Boolean = followHttpToHttpsRedirections): CacheParams = { | ||
new CacheParams(cacheLocation, cachePolicies, ttl, parallel, checksum, retryCount, cacheLocalArtifacts, followHttpToHttpsRedirections) | ||
} | ||
def withCacheLocation(cacheLocation: java.io.File): CacheParams = { | ||
copy(cacheLocation = cacheLocation) | ||
} | ||
def withCachePolicies(cachePolicies: Seq[coursier.cache.CachePolicy]): CacheParams = { | ||
copy(cachePolicies = cachePolicies) | ||
} | ||
def withTtl(ttl: Option[scala.concurrent.duration.Duration]): CacheParams = { | ||
copy(ttl = ttl) | ||
} | ||
def withTtl(ttl: scala.concurrent.duration.Duration): CacheParams = { | ||
copy(ttl = Option(ttl)) | ||
} | ||
def withParallel(parallel: Int): CacheParams = { | ||
copy(parallel = parallel) | ||
} | ||
def withChecksum(checksum: Seq[Option[String]]): CacheParams = { | ||
copy(checksum = checksum) | ||
} | ||
def withRetryCount(retryCount: Int): CacheParams = { | ||
copy(retryCount = retryCount) | ||
} | ||
def withCacheLocalArtifacts(cacheLocalArtifacts: Boolean): CacheParams = { | ||
copy(cacheLocalArtifacts = cacheLocalArtifacts) | ||
} | ||
def withFollowHttpToHttpsRedirections(followHttpToHttpsRedirections: Boolean): CacheParams = { | ||
copy(followHttpToHttpsRedirections = followHttpToHttpsRedirections) | ||
} | ||
} | ||
object CacheParams { | ||
|
||
def apply(): CacheParams = new CacheParams() | ||
def apply(cacheLocation: java.io.File, cachePolicies: Seq[coursier.cache.CachePolicy], ttl: Option[scala.concurrent.duration.Duration], parallel: Int, checksum: Seq[Option[String]], retryCount: Int, cacheLocalArtifacts: Boolean, followHttpToHttpsRedirections: Boolean): CacheParams = new CacheParams(cacheLocation, cachePolicies, ttl, parallel, checksum, retryCount, cacheLocalArtifacts, followHttpToHttpsRedirections) | ||
def apply(cacheLocation: java.io.File, cachePolicies: Seq[coursier.cache.CachePolicy], ttl: scala.concurrent.duration.Duration, parallel: Int, checksum: Seq[Option[String]], retryCount: Int, cacheLocalArtifacts: Boolean, followHttpToHttpsRedirections: Boolean): CacheParams = new CacheParams(cacheLocation, cachePolicies, Option(ttl), parallel, checksum, retryCount, cacheLocalArtifacts, followHttpToHttpsRedirections) | ||
} |
61 changes: 61 additions & 0 deletions
61
modules/coursier/shared/src/main/contraband-scala/coursier/params/ResolutionParams.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. | ||
*/ | ||
|
||
// DO NOT EDIT MANUALLY | ||
package coursier.params | ||
final class ResolutionParams private ( | ||
val keepOptionalDependencies: Boolean, | ||
val maxIterations: Int, | ||
val forceVersion: Map[coursier.core.Module, String], | ||
val forcedProperties: Map[String, String], | ||
val profiles: Set[String], | ||
val scalaVersion: String, | ||
val forceScalaVersion: Boolean, | ||
val typelevel: Boolean) extends Serializable { | ||
|
||
private def this() = this(false, 200, Map.empty, Map.empty, Set.empty, coursier.internal.Defaults.scalaVersion, false, false) | ||
|
||
override def equals(o: Any): Boolean = o match { | ||
case x: ResolutionParams => (this.keepOptionalDependencies == x.keepOptionalDependencies) && (this.maxIterations == x.maxIterations) && (this.forceVersion == x.forceVersion) && (this.forcedProperties == x.forcedProperties) && (this.profiles == x.profiles) && (this.scalaVersion == x.scalaVersion) && (this.forceScalaVersion == x.forceScalaVersion) && (this.typelevel == x.typelevel) | ||
case _ => false | ||
} | ||
override def hashCode: Int = { | ||
37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + "coursier.params.ResolutionParams".##) + keepOptionalDependencies.##) + maxIterations.##) + forceVersion.##) + forcedProperties.##) + profiles.##) + scalaVersion.##) + forceScalaVersion.##) + typelevel.##) | ||
} | ||
override def toString: String = { | ||
"ResolutionParams(" + keepOptionalDependencies + ", " + maxIterations + ", " + forceVersion + ", " + forcedProperties + ", " + profiles + ", " + scalaVersion + ", " + forceScalaVersion + ", " + typelevel + ")" | ||
} | ||
private[this] def copy(keepOptionalDependencies: Boolean = keepOptionalDependencies, maxIterations: Int = maxIterations, forceVersion: Map[coursier.core.Module, String] = forceVersion, forcedProperties: Map[String, String] = forcedProperties, profiles: Set[String] = profiles, scalaVersion: String = scalaVersion, forceScalaVersion: Boolean = forceScalaVersion, typelevel: Boolean = typelevel): ResolutionParams = { | ||
new ResolutionParams(keepOptionalDependencies, maxIterations, forceVersion, forcedProperties, profiles, scalaVersion, forceScalaVersion, typelevel) | ||
} | ||
def withKeepOptionalDependencies(keepOptionalDependencies: Boolean): ResolutionParams = { | ||
copy(keepOptionalDependencies = keepOptionalDependencies) | ||
} | ||
def withMaxIterations(maxIterations: Int): ResolutionParams = { | ||
copy(maxIterations = maxIterations) | ||
} | ||
def withForceVersion(forceVersion: Map[coursier.core.Module, String]): ResolutionParams = { | ||
copy(forceVersion = forceVersion) | ||
} | ||
def withForcedProperties(forcedProperties: Map[String, String]): ResolutionParams = { | ||
copy(forcedProperties = forcedProperties) | ||
} | ||
def withProfiles(profiles: Set[String]): ResolutionParams = { | ||
copy(profiles = profiles) | ||
} | ||
def withScalaVersion(scalaVersion: String): ResolutionParams = { | ||
copy(scalaVersion = scalaVersion) | ||
} | ||
def withForceScalaVersion(forceScalaVersion: Boolean): ResolutionParams = { | ||
copy(forceScalaVersion = forceScalaVersion) | ||
} | ||
def withTypelevel(typelevel: Boolean): ResolutionParams = { | ||
copy(typelevel = typelevel) | ||
} | ||
} | ||
object ResolutionParams { | ||
|
||
def apply(): ResolutionParams = new ResolutionParams() | ||
def apply(keepOptionalDependencies: Boolean, maxIterations: Int, forceVersion: Map[coursier.core.Module, String], forcedProperties: Map[String, String], profiles: Set[String], scalaVersion: String, forceScalaVersion: Boolean, typelevel: Boolean): ResolutionParams = new ResolutionParams(keepOptionalDependencies, maxIterations, forceVersion, forcedProperties, profiles, scalaVersion, forceScalaVersion, typelevel) | ||
} |