mirror of https://github.com/sbt/sbt.git
sjsonnew 0.14.0-M1
This commit is contained in:
parent
6fee91bbff
commit
13f7bb250b
|
|
@ -16,7 +16,7 @@ final class UpdateReport private (
|
|||
val cachedDescriptor: java.io.File,
|
||||
val configurations: Vector[sbt.librarymanagement.ConfigurationReport],
|
||||
val stats: sbt.librarymanagement.UpdateStats,
|
||||
val stamps: Map[java.io.File, Long]) extends sbt.librarymanagement.UpdateReportExtra with Serializable {
|
||||
val stamps: Map[String, Long]) extends sbt.librarymanagement.UpdateReportExtra with Serializable {
|
||||
|
||||
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ final class UpdateReport private (
|
|||
override def toString: String = {
|
||||
"Update report:\n\t" + stats + "\n" + configurations.mkString
|
||||
}
|
||||
private[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[java.io.File, Long] = stamps): UpdateReport = {
|
||||
private[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[String, Long] = stamps): UpdateReport = {
|
||||
new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
}
|
||||
def withCachedDescriptor(cachedDescriptor: java.io.File): UpdateReport = {
|
||||
|
|
@ -42,11 +42,11 @@ final class UpdateReport private (
|
|||
def withStats(stats: sbt.librarymanagement.UpdateStats): UpdateReport = {
|
||||
copy(stats = stats)
|
||||
}
|
||||
def withStamps(stamps: Map[java.io.File, Long]): UpdateReport = {
|
||||
def withStamps(stamps: Map[String, Long]): UpdateReport = {
|
||||
copy(stamps = stamps)
|
||||
}
|
||||
}
|
||||
object UpdateReport {
|
||||
|
||||
def apply(cachedDescriptor: java.io.File, configurations: Vector[sbt.librarymanagement.ConfigurationReport], stats: sbt.librarymanagement.UpdateStats, stamps: Map[java.io.File, Long]): UpdateReport = new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
def apply(cachedDescriptor: java.io.File, configurations: Vector[sbt.librarymanagement.ConfigurationReport], stats: sbt.librarymanagement.UpdateStats, stamps: Map[String, Long]): UpdateReport = new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ implicit lazy val UpdateReportFormat: JsonFormat[sbt.librarymanagement.UpdateRep
|
|||
val cachedDescriptor = unbuilder.readField[java.io.File]("cachedDescriptor")
|
||||
val configurations = unbuilder.readField[Vector[sbt.librarymanagement.ConfigurationReport]]("configurations")
|
||||
val stats = unbuilder.readField[sbt.librarymanagement.UpdateStats]("stats")
|
||||
val stamps = unbuilder.readField[Map[java.io.File, Long]]("stamps")
|
||||
val stamps = unbuilder.readField[Map[String, Long]]("stamps")
|
||||
unbuilder.endObject()
|
||||
sbt.librarymanagement.UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
case None =>
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@
|
|||
"type": "sbt.librarymanagement.UpdateStats",
|
||||
"doc": [ "stats information about the update that produced this report" ]
|
||||
},
|
||||
{ "name": "stamps", "type": "Map[java.io.File, Long]" }
|
||||
{ "name": "stamps", "type": "Map[String, Long]" }
|
||||
],
|
||||
"toString": "\"Update report:\\n\\t\" + stats + \"\\n\" + configurations.mkString"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ final class RichUpdateReport(report: UpdateReport) {
|
|||
val stamps = files
|
||||
.map(f =>
|
||||
(
|
||||
f,
|
||||
f.toString,
|
||||
// TODO: The list of files may also contain some odd files that do not actually exist like:
|
||||
// "./target/ivyhome/resolution-cache/com.example/foo/0.4.0/resolved.xml.xml".
|
||||
// IO.getModifiedTimeOrZero() will just return zero, but the list of files should not contain such
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ private[librarymanagement] abstract class UpdateReportExtra {
|
|||
def cachedDescriptor: File
|
||||
def configurations: Vector[ConfigurationReport]
|
||||
def stats: UpdateStats
|
||||
private[sbt] def stamps: Map[File, Long]
|
||||
private[sbt] def stamps: Map[String, Long]
|
||||
|
||||
/** All resolved modules in all configurations. */
|
||||
def allModules: Vector[ModuleID] = {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement.ivy
|
||||
final class IvyPaths private (
|
||||
val baseDirectory: java.io.File,
|
||||
val ivyHome: Option[java.io.File]) extends Serializable {
|
||||
val baseDirectory: String,
|
||||
val ivyHome: Option[String]) extends Serializable {
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,21 +20,21 @@ final class IvyPaths private (
|
|||
override def toString: String = {
|
||||
"IvyPaths(" + baseDirectory + ", " + ivyHome + ")"
|
||||
}
|
||||
private[this] def copy(baseDirectory: java.io.File = baseDirectory, ivyHome: Option[java.io.File] = ivyHome): IvyPaths = {
|
||||
private[this] def copy(baseDirectory: String = baseDirectory, ivyHome: Option[String] = ivyHome): IvyPaths = {
|
||||
new IvyPaths(baseDirectory, ivyHome)
|
||||
}
|
||||
def withBaseDirectory(baseDirectory: java.io.File): IvyPaths = {
|
||||
def withBaseDirectory(baseDirectory: String): IvyPaths = {
|
||||
copy(baseDirectory = baseDirectory)
|
||||
}
|
||||
def withIvyHome(ivyHome: Option[java.io.File]): IvyPaths = {
|
||||
def withIvyHome(ivyHome: Option[String]): IvyPaths = {
|
||||
copy(ivyHome = ivyHome)
|
||||
}
|
||||
def withIvyHome(ivyHome: java.io.File): IvyPaths = {
|
||||
def withIvyHome(ivyHome: String): IvyPaths = {
|
||||
copy(ivyHome = Option(ivyHome))
|
||||
}
|
||||
}
|
||||
object IvyPaths {
|
||||
|
||||
def apply(baseDirectory: java.io.File, ivyHome: Option[java.io.File]): IvyPaths = new IvyPaths(baseDirectory, ivyHome)
|
||||
def apply(baseDirectory: java.io.File, ivyHome: java.io.File): IvyPaths = new IvyPaths(baseDirectory, Option(ivyHome))
|
||||
def apply(baseDirectory: String, ivyHome: Option[String]): IvyPaths = new IvyPaths(baseDirectory, ivyHome)
|
||||
def apply(baseDirectory: String, ivyHome: String): IvyPaths = new IvyPaths(baseDirectory, Option(ivyHome))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ implicit lazy val IvyPathsFormat: JsonFormat[sbt.librarymanagement.ivy.IvyPaths]
|
|||
__jsOpt match {
|
||||
case Some(__js) =>
|
||||
unbuilder.beginObject(__js)
|
||||
val baseDirectory = unbuilder.readField[java.io.File]("baseDirectory")
|
||||
val ivyHome = unbuilder.readField[Option[java.io.File]]("ivyHome")
|
||||
val baseDirectory = unbuilder.readField[String]("baseDirectory")
|
||||
val ivyHome = unbuilder.readField[Option[String]]("ivyHome")
|
||||
unbuilder.endObject()
|
||||
sbt.librarymanagement.ivy.IvyPaths(baseDirectory, ivyHome)
|
||||
case None =>
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@
|
|||
"target": "Scala",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{ "name": "baseDirectory", "type": "java.io.File" },
|
||||
{ "name": "ivyHome", "type": "java.io.File?" }
|
||||
{ "name": "baseDirectory", "type": "String" },
|
||||
{ "name": "ivyHome", "type": "String?" }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -131,10 +131,10 @@ final class IvySbt(
|
|||
IvySbt.loadURI(is, e.uri.getOrElse(sys.error("uri must be specified!")))
|
||||
case i: InlineIvyConfiguration =>
|
||||
val paths = getIvyPaths(i.paths)
|
||||
is.setBaseDir(paths.baseDirectory)
|
||||
is.setBaseDir(new File(paths.baseDirectory))
|
||||
is.setVariable("ivy.checksums", i.checksums mkString ",")
|
||||
is.setVariable(ConvertResolver.ManagedChecksums, i.managedChecksums.toString)
|
||||
paths.ivyHome foreach is.setDefaultIvyUserDir
|
||||
paths.ivyHome.foreach { (h) => is.setDefaultIvyUserDir(new File(h)) }
|
||||
IvySbt.configureCache(is, i.resolutionCacheDir)
|
||||
IvySbt.setResolvers(is, i.resolvers, i.otherResolvers, configuration.updateOptions, log)
|
||||
IvySbt.setModuleConfigurations(is, i.moduleConfigurations, log)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class IvyCache(val ivyHome: Option[File]) {
|
|||
/** A minimal Ivy setup with only a local resolver and the current directory as the base directory. */
|
||||
private def basicLocalIvy(lock: Option[xsbti.GlobalLock], log: Logger) = {
|
||||
val local = Resolver.defaultLocal
|
||||
val paths = IvyPaths(new File("."), ivyHome)
|
||||
val paths = IvyPaths(".", ivyHome.map(_.toString))
|
||||
val conf = InlineIvyConfiguration()
|
||||
.withPaths(paths)
|
||||
.withResolvers(Vector(local))
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ object IvyInternalDefaults {
|
|||
opt.getOrElse(Logger.Null)
|
||||
|
||||
def defaultIvyPaths: IvyPaths =
|
||||
IvyPaths(defaultBaseDirectory, None)
|
||||
IvyPaths(defaultBaseDirectory.toString, None)
|
||||
|
||||
def getIvyPaths(opt: Option[IvyPaths]): IvyPaths =
|
||||
opt.getOrElse(defaultIvyPaths)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import sbt.contraband.ContrabandPlugin.autoImport._
|
|||
object Dependencies {
|
||||
val scala212 = "2.12.15"
|
||||
val scala213 = "2.13.6"
|
||||
val scala3 = "3.2.1"
|
||||
val scala3 = "3.3.1"
|
||||
|
||||
def nightlyVersion: Option[String] =
|
||||
sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version")
|
||||
|
|
@ -56,7 +56,7 @@ object Dependencies {
|
|||
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.10"
|
||||
val scalaVerify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
|
||||
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.15.3"
|
||||
val sjsonNewVersion = "0.13.0"
|
||||
val sjsonNewVersion = "0.14.0-M1"
|
||||
val sjsonnew = Def.setting {
|
||||
"com.eed3si9n" %% "sjson-new-core" % sjsonNewVersion
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue