mirror of https://github.com/sbt/sbt.git
Fix ivyPaths
This commit is contained in:
parent
290d8f1a59
commit
035cc8da60
|
|
@ -19,7 +19,7 @@ lazy val Dev = config("dev").extend(Compile)
|
|||
lazy val root = (project in file("."))
|
||||
.configs(Dev)
|
||||
.settings(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some((target.value / "ivy-cache").toString)),
|
||||
publishTo := Some(Resolver.file("Test Publish Repo", file("test-repo"))),
|
||||
scalaCompilerBridgeResolvers += userLocalFileResolver(appConfiguration.value),
|
||||
resolvers += baseDirectory { base => "Test Repo" at (base / "test-repo").toURI.toString }.value,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ ThisBuild / useCoursier := false
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some((ThisBuild / baseDirectory).value / "ivy" / "cache"))
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
val b = project
|
||||
.settings(
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ivyPaths := { IvyPaths(baseDirectory.value, Some(target.value / ".ivy2")) }
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $ copy-file changes/use.sbt build.sbt
|
|||
> update
|
||||
> update
|
||||
|
||||
$ delete target/.ivy2/local
|
||||
$ delete ivy/cache/local
|
||||
-> update
|
||||
|
||||
$ copy-file changes/resolver.sbt resolver.sbt
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ThisBuild / ivyPaths := {
|
||||
val base = (ThisBuild / baseDirectory).value
|
||||
IvyPaths(base, Some(base / "ivy-cache"))
|
||||
}
|
||||
ThisBuild / ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
ThisBuild / managedScalaInstance := false
|
||||
ThisBuild / autoScalaLibrary := false
|
||||
ThisBuild / crossPaths := false
|
||||
ivyPaths := (ThisBuild / ivyPaths).value
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ ThisBuild / scalaVersion := "2.10.4"
|
|||
ThisBuild / dependencyOverrides += "com.github.nscala-time" %% "nscala-time" % "1.0.0"
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.dependsOn(p1 % Compile)
|
||||
.settings(
|
||||
|
|
@ -22,10 +25,7 @@ lazy val root = (project in file("."))
|
|||
description := "An HTTP client for Scala with Async Http Client underneath.",
|
||||
licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")),
|
||||
)),
|
||||
ivyPaths := IvyPaths(
|
||||
(ThisBuild / baseDirectory).value,
|
||||
Some((LocalRootProject / baseDirectory).value / "ivy-cache")
|
||||
),
|
||||
localCache,
|
||||
libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "1.0.0",
|
||||
|
||||
// https://github.com/sbt/sbt/pull/1620
|
||||
|
|
|
|||
|
|
@ -10,9 +10,12 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
ThisBuild / organization := "org.example"
|
||||
ThisBuild / version := "1.0-SNAPSHOT"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
scalaVersion := "2.10.4",
|
||||
fullResolvers := fullResolvers.value.filterNot(_.name == "inter-project"),
|
||||
updateOptions := updateOptions.value.withCachedResolution(true)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@ val akkaVersion = "2.3.1"
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths( (ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
scalaVersion := "2.10.4",
|
||||
fullResolvers := fullResolvers.value.filterNot(_.name == "inter-project")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@ lazy val check = taskKey[Unit]("Runs the check")
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
scalaVersion := "2.10.4",
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@ import xsbti.AppConfiguration
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ThisBuild / scalaVersion := "2.12.17"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Vector[Def.Setting[_]] =
|
||||
Vector(
|
||||
organization := "com.example",
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
scalaCompilerBridgeResolvers += userLocalFileResolver(appConfiguration.value),
|
||||
resolvers += Resolver.file("buggy", (LocalRootProject / baseDirectory).value / "repo")(
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@ inThisBuild(Seq(
|
|||
updateOptions := updateOptions.value.withCachedResolution(true)
|
||||
))
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] = Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
fullResolvers := fullResolvers.value.filterNot(_.name == "inter-project")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@ lazy val check = taskKey[Unit]("Runs the check")
|
|||
ThisBuild / useCoursier := false
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
scalaVersion := "2.10.4",
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ lazy val check = taskKey[Unit]("Runs the check")
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
scalaVersion := "2.10.4",
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
|
|
|
|||
|
|
@ -6,9 +6,12 @@ val junit = "junit" % "junit" % "4.13.1"
|
|||
ThisBuild / scalaVersion := "2.12.12"
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
ThisBuild / organization := "org.example"
|
||||
ThisBuild / version := "1.0"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
dependencyCacheDirectory := (LocalRootProject / baseDirectory).value / "dependency",
|
||||
libraryDependencies := Seq(
|
||||
"net.databinder" %% "unfiltered-uploads" % "0.8.0",
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ lazy val check = taskKey[Unit]("Runs the check")
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
ThisBuild / scalaVersion := "2.11.12",
|
||||
ThisBuild / organization := "com.example",
|
||||
ThisBuild / version := "0.1.0-SNAPSHOT",
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
lazy val check = taskKey[Unit]("Runs the check")
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths( (ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
scalaVersion := "2.10.4",
|
||||
fullResolvers := fullResolvers.value.filterNot(_.name == "inter-project"),
|
||||
updateOptions := updateOptions.value.withCircularDependencyLevel(CircularDependencyLevel.Error)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ lazy val check = taskKey[Unit]("Runs the check")
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
localCache,
|
||||
scalaVersion := "2.10.4",
|
||||
fullResolvers := fullResolvers.value.filterNot(_.name == "inter-project")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache"))
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
libraryDependencies += "org.testng" % "testng" % "5.7" classifier "jdk15"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
ThisBuild / scalaVersion := "2.13.0"
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache"))
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
// don't blow up when credential file doesn't exist
|
||||
// https://github.com/sbt/sbt/issues/4882
|
||||
|
|
|
|||
|
|
@ -14,8 +14,11 @@ lazy val b = project.settings(common: _*).settings(
|
|||
libraryDependencies := Seq(organization.value %% "a" % version.value)
|
||||
)
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val common = Seq(
|
||||
localCache,
|
||||
autoScalaLibrary := false, // avoid downloading fresh scala-library/scala-compiler
|
||||
managedScalaInstance := false,
|
||||
ivyPaths := IvyPaths( (ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache"))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ThisBuild / scalaVersion := "2.12.17"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
localCache,
|
||||
libraryDependencies += baseDirectory(transitive("javax.mail" % "mail" % "1.4.1")).value,
|
||||
TaskKey[Unit]("checkTransitive") := check(true).value,
|
||||
TaskKey[Unit]("checkIntransitive") := check(false).value
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
localCache,
|
||||
organization := "com.example",
|
||||
version := "1.0",
|
||||
name := "define-color",
|
||||
|
|
@ -9,7 +13,6 @@ lazy val root = (project in file("."))
|
|||
val old = projectID.value
|
||||
old.extra("e:color" -> "red")
|
||||
},
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
publishMavenStyle := false,
|
||||
publishTo := {
|
||||
val base = baseDirectory.value
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
ThisBuild / useCoursier := false
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
localCache,
|
||||
organization := "org.example",
|
||||
name := "use-color",
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
publishMavenStyle := false,
|
||||
resolvers := baseDirectory( base =>
|
||||
resolvers := baseDirectory( base =>
|
||||
Resolver.file("test-repo", base / "repo" / "test")(Resolver.defaultIvyPatterns) :: Nil
|
||||
).value,
|
||||
libraryDependencies := {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
localCache,
|
||||
libraryDependencies ++= baseDirectory (libraryDeps).value,
|
||||
TaskKey[Unit]("checkForced") := check("1.2.14").value,
|
||||
TaskKey[Unit]("checkDepend") := check("1.2.13").value
|
||||
)
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
def libraryDeps(base: File) = {
|
||||
val slf4j = Seq("org.slf4j" % "slf4j-log4j12" % "1.1.0") // Uses log4j 1.2.13
|
||||
if ((base / "force").exists) slf4j :+ ("log4j" % "log4j" % "1.2.14").force() else slf4j
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
import scala.xml._
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
localCache,
|
||||
ivyXML := inlineXML(customInfo.value, organization.value, moduleName.value, version.value),
|
||||
scalaVersion := "2.9.1",
|
||||
projectID ~= (_ cross false),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
libraryDependencies += "org.scalacheck" % "scalacheck" % "1.5"
|
||||
|
||||
ivyPaths := baseDirectory( dir => IvyPaths(dir, Some(dir / "ivy-home"))).value
|
||||
|
||||
TaskKey[Unit]("check") := {
|
||||
val report = update.value
|
||||
val files = report.matching( moduleFilter(organization = "org.scalacheck", name = "scalacheck", revision = "1.5") )
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / ".ivy2"))
|
||||
|
||||
// not in the default repositories
|
||||
libraryDependencies += "com.sun.jmx" % "jmxri" % "1.2.1"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache"))
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
organization := "org.example"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
autoScalaLibrary := false
|
||||
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache"))
|
||||
|
||||
scalaModuleInfo := Some(sbt.librarymanagement.ScalaModuleInfo(
|
||||
(update / scalaVersion).value,
|
||||
(update / scalaBinaryVersion).value,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
val checkIvyXml = taskKey[Unit]("Checks the ivy.xml transform was correct")
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
localCache,
|
||||
name := "test-parent-pom",
|
||||
ivyPaths := IvyPaths( (ThisBuild / baseDirectory).value, Some((LocalRootProject / target).value / "ivy-cache")),
|
||||
resolvers += MavenCache("Maven2 Local Test", baseDirectory.value / "local-repo"),
|
||||
libraryDependencies += "com.example" % "example-child" % "1.0-SNAPSHOT",
|
||||
libraryDependencies += "org.apache.geronimo.specs" % "geronimo-jta_1.1_spec" % "1.1.1",
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@ ThisBuild / organization := "com.example"
|
|||
ThisBuild / scalaVersion := "2.12.12"
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def customIvyPaths: Seq[Def.Setting[_]] = Seq(
|
||||
ivyPaths := IvyPaths((ThisBuild / baseDirectory).value, Some((ThisBuild / baseDirectory).value / "ivy-cache"))
|
||||
)
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val sharedResolver: Resolver = {
|
||||
val r = Resolver.defaultShared
|
||||
|
|
@ -14,7 +13,7 @@ lazy val sharedResolver: Resolver = {
|
|||
}
|
||||
|
||||
lazy val common = project
|
||||
.settings(customIvyPaths)
|
||||
.settings(localCache)
|
||||
.settings(
|
||||
organization := "com.badexample",
|
||||
name := "badexample",
|
||||
|
|
@ -30,7 +29,7 @@ lazy val common = project
|
|||
)
|
||||
|
||||
lazy val dependent = project
|
||||
.settings(customIvyPaths)
|
||||
.settings(localCache)
|
||||
.settings(
|
||||
// Ignore the inter-project resolver, so we force to look remotely.
|
||||
resolvers += sharedResolver,
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ ThisBuild / scalaVersion := "2.12.12"
|
|||
ThisBuild / useCoursier := false
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def customIvyPaths: Seq[Def.Setting[_]] = Seq(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some((ThisBuild / baseDirectory).value / "ivy" / "cache"))
|
||||
)
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val sharedResolver: Resolver = {
|
||||
val r = Resolver.defaultShared
|
||||
|
|
@ -17,7 +16,7 @@ lazy val sharedResolver: Resolver = {
|
|||
}
|
||||
|
||||
lazy val common = project
|
||||
.settings(customIvyPaths)
|
||||
.settings(localCache)
|
||||
.settings(
|
||||
organization := "com.badexample",
|
||||
name := "badexample",
|
||||
|
|
@ -34,7 +33,7 @@ lazy val common = project
|
|||
)
|
||||
|
||||
lazy val dependent = project
|
||||
.settings(customIvyPaths)
|
||||
.settings(localCache)
|
||||
.settings(
|
||||
// Uncomment the following to test the before/after
|
||||
// updateOptions := updateOptions.value.withLatestSnapshots(false),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
autoScalaLibrary := false
|
||||
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache"))
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"org.sat4j" % "org.sat4j.pb" % "2.3.1",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-c
|
|||
|
||||
ivyPaths := {
|
||||
val base = baseDirectory.value
|
||||
IvyPaths(base, Some(base / "ivy-cache"))
|
||||
IvyPaths(base.toString, Some((base / "ivy-cache").toString))
|
||||
}
|
||||
|
||||
managedScalaInstance := false
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
# define a test jar and publish locally as ivy.xml
|
||||
# and to a file repository as pom.xml
|
||||
|
||||
$ copy-file changes/def/build.sbt build.sbt
|
||||
$ copy-file changes/def/Def.java src/test/java/Def.java
|
||||
> reload
|
||||
> publishLocal
|
||||
> publish
|
||||
> clean
|
||||
|
||||
$ delete build.sbt
|
||||
$ delete src/test/java/Def.java
|
||||
|
||||
# use the test jar from the maven repository
|
||||
# by requesting the "tests" classifier
|
||||
|
||||
$ copy-file changes/use/build.sbt build.sbt
|
||||
$ copy-file changes/use/Use.java Use.java
|
||||
$ copy-file changes/use/pom.sbt pom.sbt
|
||||
> reload
|
||||
> compile
|
||||
> clean
|
||||
|
||||
# necessary because the cache can't deal with two different types of metadata
|
||||
$ delete ivy-cache/cache
|
||||
|
||||
|
||||
# then, use the test jar via the Ivy repository
|
||||
# by requesting the "test" configuration
|
||||
|
||||
$ delete pom.sbt
|
||||
$ copy-file changes/use/local.sbt local.sbt
|
||||
> reload
|
||||
> show update
|
||||
> export dependencyClasspath
|
||||
> compile
|
||||
|
|
@ -2,9 +2,12 @@ import sbt.internal.inc.classpath.ClasspathUtilities
|
|||
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
|
||||
def localCache =
|
||||
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
ivyPaths := IvyPaths(baseDirectory.value, Some(target.value / "ivy-cache")),
|
||||
localCache,
|
||||
libraryDependencies += "org.jsoup" % "jsoup" % "1.9.1" % Test from "https://jsoup.org/packages/jsoup-1.9.1.jar",
|
||||
ivyLoggingLevel := UpdateLogging.Full,
|
||||
TaskKey[Unit]("checkInTest") := checkClasspath(Test).value,
|
||||
|
|
|
|||
Loading…
Reference in New Issue