mirror of https://github.com/sbt/sbt.git
Merge branch 'wip/sbt-2.x-merge' into wip/sbt-2.x
This commit is contained in:
commit
02fc0d9d89
|
|
@ -37,8 +37,8 @@ ThisBuild / publishTo := {
|
||||||
val nexus = "https://oss.sonatype.org/"
|
val nexus = "https://oss.sonatype.org/"
|
||||||
Some("releases" at nexus + "service/local/staging/deploy/maven2")
|
Some("releases" at nexus + "service/local/staging/deploy/maven2")
|
||||||
}
|
}
|
||||||
|
|
||||||
ThisBuild / Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat
|
ThisBuild / Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat
|
||||||
|
ThisBuild / evictionErrorLevel := Level.Info
|
||||||
|
|
||||||
def commonSettings: Seq[Setting[_]] = Def.settings(
|
def commonSettings: Seq[Setting[_]] = Def.settings(
|
||||||
scalaVersion := scala3,
|
scalaVersion := scala3,
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ private[librarymanagement] abstract class ConfigurationExtra {
|
||||||
}
|
}
|
||||||
|
|
||||||
private[sbt] object ConfigurationMacro:
|
private[sbt] object ConfigurationMacro:
|
||||||
def configMacroImpl(name: Expr[String])(using Quotes): Expr[Configuration] = {
|
def configMacroImpl(name: Expr[String])(using Quotes): Expr[Configuration] =
|
||||||
import quotes.reflect.*
|
import quotes.reflect.*
|
||||||
def enclosingTerm(sym: Symbol): Symbol =
|
def enclosingTerm(sym: Symbol): Symbol =
|
||||||
sym match
|
sym match
|
||||||
|
|
@ -128,7 +128,6 @@ private[sbt] object ConfigurationMacro:
|
||||||
if enclosingValName.head.isLower then report.error("configuration id must be capitalized")
|
if enclosingValName.head.isLower then report.error("configuration id must be capitalized")
|
||||||
val id = Expr(enclosingValName)
|
val id = Expr(enclosingValName)
|
||||||
'{ Configuration.of($id, $name) }
|
'{ Configuration.of($id, $name) }
|
||||||
}
|
|
||||||
end ConfigurationMacro
|
end ConfigurationMacro
|
||||||
|
|
||||||
private[librarymanagement] abstract class ConfigRefFunctions {
|
private[librarymanagement] abstract class ConfigRefFunctions {
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@ object ScalaArtifacts {
|
||||||
|
|
||||||
def libraryDependency(version: String): ModuleID = libraryDependency(Organization, version)
|
def libraryDependency(version: String): ModuleID = libraryDependency(Organization, version)
|
||||||
|
|
||||||
def libraryDependency(org: String, version: String): ModuleID = {
|
def libraryDependency(org: String, version: String): ModuleID =
|
||||||
if (isScala3(version))
|
if isScala3(version) then
|
||||||
ModuleID(org, Scala3LibraryID, version).withCrossVersion(CrossVersion.binary)
|
ModuleID(org, Scala3LibraryID, version)
|
||||||
else
|
.withCrossVersion(CrossVersion.binary)
|
||||||
ModuleID(org, LibraryID, version)
|
.platform(Platform.jvm)
|
||||||
}
|
else ModuleID(org, LibraryID, version).platform(Platform.jvm)
|
||||||
|
|
||||||
private[sbt] def docToolDependencies(
|
private[sbt] def docToolDependencies(
|
||||||
org: String,
|
org: String,
|
||||||
|
|
@ -79,6 +79,7 @@ object ScalaArtifacts {
|
||||||
ModuleID(org, ScaladocID, version)
|
ModuleID(org, ScaladocID, version)
|
||||||
.withConfigurations(Some(Configurations.ScalaDocTool.name + "->default(compile)"))
|
.withConfigurations(Some(Configurations.ScalaDocTool.name + "->default(compile)"))
|
||||||
.withCrossVersion(CrossVersion.binary)
|
.withCrossVersion(CrossVersion.binary)
|
||||||
|
.platform(Platform.jvm)
|
||||||
)
|
)
|
||||||
else Seq.empty
|
else Seq.empty
|
||||||
|
|
||||||
|
|
@ -91,6 +92,7 @@ object ScalaArtifacts {
|
||||||
ModuleID(org, Scala3CompilerID, version)
|
ModuleID(org, Scala3CompilerID, version)
|
||||||
.withConfigurations(Some(Configurations.ScalaTool.name + "->default(compile)"))
|
.withConfigurations(Some(Configurations.ScalaTool.name + "->default(compile)"))
|
||||||
.withCrossVersion(CrossVersion.binary)
|
.withCrossVersion(CrossVersion.binary)
|
||||||
|
.platform(Platform.jvm)
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
Seq(
|
Seq(
|
||||||
|
|
@ -99,9 +101,11 @@ object ScalaArtifacts {
|
||||||
)
|
)
|
||||||
|
|
||||||
private[this] def scala2ToolDependency(org: String, id: String, version: String): ModuleID =
|
private[this] def scala2ToolDependency(org: String, id: String, version: String): ModuleID =
|
||||||
ModuleID(org, id, version).withConfigurations(
|
ModuleID(org, id, version)
|
||||||
Some(Configurations.ScalaTool.name + "->default,optional(default)")
|
.withConfigurations(
|
||||||
)
|
Some(Configurations.ScalaTool.name + "->default,optional(default)")
|
||||||
|
)
|
||||||
|
.platform(Platform.jvm)
|
||||||
}
|
}
|
||||||
|
|
||||||
object SbtArtifacts {
|
object SbtArtifacts {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ object ResolverExtraTest extends BasicTestSuite {
|
||||||
// - Helper functions ----------------------------------------------------------------------------
|
// - Helper functions ----------------------------------------------------------------------------
|
||||||
// -----------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------
|
||||||
def assertExpansion(input: String, expected: String) =
|
def assertExpansion(input: String, expected: String) =
|
||||||
assert(Resolver.expandMavenSettings(input) == expected)
|
Predef.assert(Resolver.expandMavenSettings(input) == s"$expected")
|
||||||
|
|
||||||
def env(name: String) = sys.env.getOrElse(name, "")
|
def env(name: String) = sys.env.getOrElse(name, "")
|
||||||
def prop(name: String) = sys.props.getOrElse(name, "")
|
def prop(name: String) = sys.props.getOrElse(name, "")
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.librarymanagement.ivy
|
package sbt.librarymanagement.ivy
|
||||||
final class IvyPaths private (
|
final class IvyPaths private (
|
||||||
val baseDirectory: java.io.File,
|
val baseDirectory: String,
|
||||||
val ivyHome: Option[java.io.File]) extends Serializable {
|
val ivyHome: Option[String]) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,21 +20,21 @@ final class IvyPaths private (
|
||||||
override def toString: String = {
|
override def toString: String = {
|
||||||
"IvyPaths(" + baseDirectory + ", " + ivyHome + ")"
|
"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)
|
new IvyPaths(baseDirectory, ivyHome)
|
||||||
}
|
}
|
||||||
def withBaseDirectory(baseDirectory: java.io.File): IvyPaths = {
|
def withBaseDirectory(baseDirectory: String): IvyPaths = {
|
||||||
copy(baseDirectory = baseDirectory)
|
copy(baseDirectory = baseDirectory)
|
||||||
}
|
}
|
||||||
def withIvyHome(ivyHome: Option[java.io.File]): IvyPaths = {
|
def withIvyHome(ivyHome: Option[String]): IvyPaths = {
|
||||||
copy(ivyHome = ivyHome)
|
copy(ivyHome = ivyHome)
|
||||||
}
|
}
|
||||||
def withIvyHome(ivyHome: java.io.File): IvyPaths = {
|
def withIvyHome(ivyHome: String): IvyPaths = {
|
||||||
copy(ivyHome = Option(ivyHome))
|
copy(ivyHome = Option(ivyHome))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
object IvyPaths {
|
object IvyPaths {
|
||||||
|
|
||||||
def apply(baseDirectory: java.io.File, ivyHome: Option[java.io.File]): IvyPaths = new IvyPaths(baseDirectory, ivyHome)
|
def apply(baseDirectory: String, ivyHome: Option[String]): 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: String): IvyPaths = new IvyPaths(baseDirectory, Option(ivyHome))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ implicit lazy val IvyPathsFormat: JsonFormat[sbt.librarymanagement.ivy.IvyPaths]
|
||||||
__jsOpt match {
|
__jsOpt match {
|
||||||
case Some(__js) =>
|
case Some(__js) =>
|
||||||
unbuilder.beginObject(__js)
|
unbuilder.beginObject(__js)
|
||||||
val baseDirectory = unbuilder.readField[java.io.File]("baseDirectory")
|
val baseDirectory = unbuilder.readField[String]("baseDirectory")
|
||||||
val ivyHome = unbuilder.readField[Option[java.io.File]]("ivyHome")
|
val ivyHome = unbuilder.readField[Option[String]]("ivyHome")
|
||||||
unbuilder.endObject()
|
unbuilder.endObject()
|
||||||
sbt.librarymanagement.ivy.IvyPaths(baseDirectory, ivyHome)
|
sbt.librarymanagement.ivy.IvyPaths(baseDirectory, ivyHome)
|
||||||
case None =>
|
case None =>
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,8 @@
|
||||||
"target": "Scala",
|
"target": "Scala",
|
||||||
"type": "record",
|
"type": "record",
|
||||||
"fields": [
|
"fields": [
|
||||||
{ "name": "baseDirectory", "type": "java.io.File" },
|
{ "name": "baseDirectory", "type": "String" },
|
||||||
{ "name": "ivyHome", "type": "java.io.File?" }
|
{ "name": "ivyHome", "type": "String?" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import ivyint.{
|
||||||
}
|
}
|
||||||
import sjsonnew.JsonFormat
|
import sjsonnew.JsonFormat
|
||||||
import sjsonnew.support.murmurhash.Hasher
|
import sjsonnew.support.murmurhash.Hasher
|
||||||
|
import sbt.librarymanagement.ModuleSettings
|
||||||
|
|
||||||
final class IvySbt(
|
final class IvySbt(
|
||||||
val configuration: IvyConfiguration,
|
val configuration: IvyConfiguration,
|
||||||
|
|
@ -125,10 +126,10 @@ final class IvySbt(
|
||||||
IvySbt.loadURI(is, e.uri.getOrElse(sys.error("uri must be specified!")))
|
IvySbt.loadURI(is, e.uri.getOrElse(sys.error("uri must be specified!")))
|
||||||
case i: InlineIvyConfiguration =>
|
case i: InlineIvyConfiguration =>
|
||||||
val paths = getIvyPaths(i.paths)
|
val paths = getIvyPaths(i.paths)
|
||||||
is.setBaseDir(paths.baseDirectory)
|
is.setBaseDir(new File(paths.baseDirectory))
|
||||||
is.setVariable("ivy.checksums", i.checksums mkString ",")
|
is.setVariable("ivy.checksums", i.checksums mkString ",")
|
||||||
is.setVariable(ConvertResolver.ManagedChecksums, i.managedChecksums.toString)
|
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.configureCache(is, i.resolutionCacheDir)
|
||||||
IvySbt.setResolvers(is, i.resolvers, i.otherResolvers, configuration.updateOptions, log)
|
IvySbt.setResolvers(is, i.resolvers, i.otherResolvers, configuration.updateOptions, log)
|
||||||
IvySbt.setModuleConfigurations(is, i.moduleConfigurations, log)
|
IvySbt.setModuleConfigurations(is, i.moduleConfigurations, log)
|
||||||
|
|
@ -240,8 +241,8 @@ final class IvySbt(
|
||||||
val moduleSettings: ModuleSettings =
|
val moduleSettings: ModuleSettings =
|
||||||
rawModuleSettings match {
|
rawModuleSettings match {
|
||||||
case ic: InlineConfiguration =>
|
case ic: InlineConfiguration =>
|
||||||
val icWithCross = IvySbt.substituteCross(ic)
|
val icWithCross: ModuleSettings = IvySbt.substituteCross(ic)
|
||||||
if (appendSbtCrossVersion) IvySbt.appendSbtCrossVersion(icWithCross)
|
if appendSbtCrossVersion then IvySbt.appendSbtCrossVersion(icWithCross)
|
||||||
else icWithCross
|
else icWithCross
|
||||||
case m => m
|
case m => m
|
||||||
}
|
}
|
||||||
|
|
@ -717,31 +718,33 @@ private[sbt] object IvySbt {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private def substituteCross(ic: InlineConfiguration): InlineConfiguration = {
|
private def substituteCross(m: ModuleSettings): ModuleSettings =
|
||||||
ic.scalaModuleInfo match {
|
m.scalaModuleInfo match {
|
||||||
case None => ic
|
case None => m
|
||||||
case Some(is) => substituteCross(ic, is.scalaFullVersion, is.scalaBinaryVersion, is.platform)
|
case Some(is) => substituteCross(m, is.scalaFullVersion, is.scalaBinaryVersion, is.platform)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private def substituteCross(
|
private def substituteCross(
|
||||||
ic: InlineConfiguration,
|
m: ModuleSettings,
|
||||||
scalaFullVersion: String,
|
scalaFullVersion: String,
|
||||||
scalaBinaryVersion: String,
|
scalaBinaryVersion: String,
|
||||||
platform: Option[String]
|
platform: Option[String]
|
||||||
): InlineConfiguration = {
|
): ModuleSettings = {
|
||||||
val applyPlatform: ModuleID => ModuleID = substitutePlatform(platform)
|
m match
|
||||||
val applyCross = CrossVersion(scalaFullVersion, scalaBinaryVersion)
|
case ic: InlineConfiguration =>
|
||||||
val transform: ModuleID => ModuleID = (m: ModuleID) => applyCross(applyPlatform(m))
|
val applyPlatform: ModuleID => ModuleID = substitutePlatform(platform)
|
||||||
def propagateCrossVersion(moduleID: ModuleID): ModuleID = {
|
val applyCross = CrossVersion(scalaFullVersion, scalaBinaryVersion)
|
||||||
val crossExclusions: Vector[ExclusionRule] =
|
val transform: ModuleID => ModuleID = (m: ModuleID) => applyCross(applyPlatform(m))
|
||||||
moduleID.exclusions.map(CrossVersion.substituteCross(_, ic.scalaModuleInfo))
|
def propagateCrossVersion(moduleID: ModuleID): ModuleID = {
|
||||||
transform(moduleID)
|
val crossExclusions: Vector[ExclusionRule] =
|
||||||
.withExclusions(crossExclusions)
|
moduleID.exclusions.map(CrossVersion.substituteCross(_, ic.scalaModuleInfo))
|
||||||
}
|
transform(moduleID)
|
||||||
ic.withModule(transform(ic.module))
|
.withExclusions(crossExclusions)
|
||||||
.withDependencies(ic.dependencies.map(propagateCrossVersion))
|
}
|
||||||
.withOverrides(ic.overrides map transform)
|
ic.withModule(transform(ic.module))
|
||||||
|
.withDependencies(ic.dependencies.map(propagateCrossVersion))
|
||||||
|
.withOverrides(ic.overrides map transform)
|
||||||
|
case m => m
|
||||||
}
|
}
|
||||||
|
|
||||||
private def substitutePlatform(platform: Option[String]): ModuleID => ModuleID = {
|
private def substitutePlatform(platform: Option[String]): ModuleID => ModuleID = {
|
||||||
|
|
@ -750,16 +753,22 @@ private[sbt] object IvySbt {
|
||||||
case "" | Platform.jvm => m
|
case "" | Platform.jvm => m
|
||||||
case _ => m.withName(s"${m.name}_$platformName")
|
case _ => m.withName(s"${m.name}_$platformName")
|
||||||
(m: ModuleID) =>
|
(m: ModuleID) =>
|
||||||
(platform, m.platformOpt) match
|
m.crossVersion match
|
||||||
case (Some(p), None) => addSuffix(m, p)
|
case _: Disabled => m
|
||||||
case (_, Some(p)) => addSuffix(m, p)
|
case _ =>
|
||||||
case _ => m
|
(platform, m.platformOpt) match
|
||||||
|
case (Some(p), None) => addSuffix(m, p)
|
||||||
|
case (_, Some(p)) => addSuffix(m, p)
|
||||||
|
case _ => m
|
||||||
}
|
}
|
||||||
|
|
||||||
private def appendSbtCrossVersion(ic: InlineConfiguration): InlineConfiguration =
|
private def appendSbtCrossVersion(m: ModuleSettings): ModuleSettings =
|
||||||
ic.withModule(appendSbtCrossVersion(ic.module))
|
m match
|
||||||
.withDependencies(ic.dependencies.map(appendSbtCrossVersion))
|
case ic: InlineConfiguration =>
|
||||||
.withOverrides(ic.overrides.map(appendSbtCrossVersion))
|
ic.withModule(appendSbtCrossVersion(ic.module))
|
||||||
|
.withDependencies(ic.dependencies.map(appendSbtCrossVersion))
|
||||||
|
.withOverrides(ic.overrides.map(appendSbtCrossVersion))
|
||||||
|
case m => m
|
||||||
|
|
||||||
private def appendSbtCrossVersion(mid: ModuleID): ModuleID = {
|
private def appendSbtCrossVersion(mid: ModuleID): ModuleID = {
|
||||||
val crossVersion = for {
|
val crossVersion = for {
|
||||||
|
|
|
||||||
|
|
@ -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. */
|
/** 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) = {
|
private def basicLocalIvy(lock: Option[xsbti.GlobalLock], log: Logger) = {
|
||||||
val local = Resolver.defaultLocal
|
val local = Resolver.defaultLocal
|
||||||
val paths = IvyPaths(new File("."), ivyHome)
|
val paths = IvyPaths(".", ivyHome.map(_.toString))
|
||||||
val conf = InlineIvyConfiguration()
|
val conf = InlineIvyConfiguration()
|
||||||
.withPaths(paths)
|
.withPaths(paths)
|
||||||
.withResolvers(Vector(local))
|
.withResolvers(Vector(local))
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ object IvyInternalDefaults {
|
||||||
opt.getOrElse(Logger.Null)
|
opt.getOrElse(Logger.Null)
|
||||||
|
|
||||||
def defaultIvyPaths: IvyPaths =
|
def defaultIvyPaths: IvyPaths =
|
||||||
IvyPaths(defaultBaseDirectory, None)
|
IvyPaths(defaultBaseDirectory.toString, None)
|
||||||
|
|
||||||
def getIvyPaths(opt: Option[IvyPaths]): IvyPaths =
|
def getIvyPaths(opt: Option[IvyPaths]): IvyPaths =
|
||||||
opt.getOrElse(defaultIvyPaths)
|
opt.getOrElse(defaultIvyPaths)
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ trait BaseIvySpecification extends AbstractEngineSpec {
|
||||||
val moduleConfs = Vector(ModuleConfiguration("*", chainResolver))
|
val moduleConfs = Vector(ModuleConfiguration("*", chainResolver))
|
||||||
val resCacheDir = currentTarget / "resolution-cache"
|
val resCacheDir = currentTarget / "resolution-cache"
|
||||||
InlineIvyConfiguration()
|
InlineIvyConfiguration()
|
||||||
.withPaths(IvyPaths(currentBase, Some(currentTarget)))
|
.withPaths(IvyPaths(currentBase.toString, Some(currentTarget.toString)))
|
||||||
.withResolvers(resolvers)
|
.withResolvers(resolvers)
|
||||||
.withModuleConfigurations(moduleConfs)
|
.withModuleConfigurations(moduleConfs)
|
||||||
.withChecksums(Vector.empty)
|
.withChecksums(Vector.empty)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ object CustomPomParserTest extends BasicTestSuite {
|
||||||
withTemporaryDirectory { cacheDir =>
|
withTemporaryDirectory { cacheDir =>
|
||||||
val repoUrl = getClass.getResource("/test-maven-repo")
|
val repoUrl = getClass.getResource("/test-maven-repo")
|
||||||
val local = MavenRepository("Test Repo", repoUrl.toExternalForm)
|
val local = MavenRepository("Test Repo", repoUrl.toExternalForm)
|
||||||
val paths = IvyPaths(new File("."), Some(cacheDir))
|
val paths = IvyPaths(new File(".").toString, Some(cacheDir.toString))
|
||||||
val conf = InlineIvyConfiguration()
|
val conf = InlineIvyConfiguration()
|
||||||
.withPaths(paths)
|
.withPaths(paths)
|
||||||
.withResolvers(Vector(local))
|
.withResolvers(Vector(local))
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ object ManagedChecksumsSpec extends BaseIvySpecification {
|
||||||
val moduleConfs = Vector(ModuleConfiguration("*", chainResolver))
|
val moduleConfs = Vector(ModuleConfiguration("*", chainResolver))
|
||||||
val resCacheDir = currentTarget / "resolution-cache"
|
val resCacheDir = currentTarget / "resolution-cache"
|
||||||
InlineIvyConfiguration()
|
InlineIvyConfiguration()
|
||||||
.withPaths(IvyPaths(currentBase, Some(currentTarget)))
|
.withPaths(IvyPaths(currentBase.toString, Some(currentTarget.toString)))
|
||||||
.withResolvers(resolvers)
|
.withResolvers(resolvers)
|
||||||
.withModuleConfigurations(moduleConfs)
|
.withModuleConfigurations(moduleConfs)
|
||||||
.withChecksums(Vector(Checksum))
|
.withChecksums(Vector(Checksum))
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,20 @@ object PlatformResolutionSpec extends BaseIvySpecification {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test("sjs1 platform resolves % as JVM") {
|
||||||
|
cleanCache()
|
||||||
|
val m = module(
|
||||||
|
exampleModuleId("0.6.0"),
|
||||||
|
deps = Vector(junit),
|
||||||
|
Some(scala2_13),
|
||||||
|
platform = Some(sjs1),
|
||||||
|
)
|
||||||
|
assert(
|
||||||
|
update(m).configurations.head.modules.map(_.toString).mkString
|
||||||
|
contains "junit:junit:4.13.1"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
test("None platform can specify .platform(sjs1) depenency") {
|
test("None platform can specify .platform(sjs1) depenency") {
|
||||||
cleanCache()
|
cleanCache()
|
||||||
val m = module(
|
val m = module(
|
||||||
|
|
@ -64,6 +78,7 @@ object PlatformResolutionSpec extends BaseIvySpecification {
|
||||||
|
|
||||||
def exampleModuleId(v: String): ModuleID = ("com.example" % "foo" % v % Compile)
|
def exampleModuleId(v: String): ModuleID = ("com.example" % "foo" % v % Compile)
|
||||||
def scopt = ("com.github.scopt" %% "scopt" % "4.1.0" % Compile)
|
def scopt = ("com.github.scopt" %% "scopt" % "4.1.0" % Compile)
|
||||||
|
def junit = ("junit" % "junit" % "4.13.1" % Compile)
|
||||||
override val resolvers = Vector(
|
override val resolvers = Vector(
|
||||||
Resolver.mavenCentral,
|
Resolver.mavenCentral,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ object Dependencies {
|
||||||
val jsch = "com.github.mwiede" % "jsch" % "0.2.17" intransitive ()
|
val jsch = "com.github.mwiede" % "jsch" % "0.2.17" intransitive ()
|
||||||
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
||||||
val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
|
val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
|
||||||
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.1.0"
|
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.3.0"
|
||||||
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.10"
|
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.18"
|
||||||
val scalaVerify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
|
val scalaVerify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
|
||||||
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.15.3"
|
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.15.3"
|
||||||
val sjsonNewVersion = "0.14.0-M1"
|
val sjsonNewVersion = "0.14.0-M1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue