mirror of https://github.com/sbt/sbt.git
Port dependency-management/ivy-settings-c
This commit is contained in:
parent
7520bd99a5
commit
e244cd695c
|
|
@ -0,0 +1,32 @@
|
|||
lazy val commonSettings = Seq(
|
||||
autoScalaLibrary := false,
|
||||
ivyScala := None,
|
||||
unmanagedJars in Compile <++= scalaInstance map (_.allJars.toSeq),
|
||||
publishArtifact in packageSrc := false,
|
||||
publishArtifact in packageDoc := false,
|
||||
publishMavenStyle := false
|
||||
)
|
||||
|
||||
lazy val dep = project.
|
||||
settings(
|
||||
commonSettings,
|
||||
organization := "org.example",
|
||||
version := "1.0",
|
||||
publishTo <<= baseDirectory in ThisBuild apply { base =>
|
||||
Some(Resolver.file("file", base / "repo")(Resolver.ivyStylePatterns))
|
||||
}
|
||||
)
|
||||
|
||||
lazy val use = project.
|
||||
settings(
|
||||
commonSettings,
|
||||
libraryDependencies += "org.example" %% "dep" % "1.0",
|
||||
externalIvySettings(),
|
||||
publishTo <<= baseDirectory { base =>
|
||||
Some(Resolver.file("file", base / "repo")(Resolver.ivyStylePatterns))
|
||||
},
|
||||
TaskKey[Unit]("check") <<= baseDirectory map {base =>
|
||||
val inCache = ( (base / "target" / "use-cache") ** "*.jar").get
|
||||
assert(inCache.isEmpty, "Cache contained jars: " + inCache)
|
||||
}
|
||||
)
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import sbt._
|
||||
import Import._
|
||||
import Keys._
|
||||
|
||||
object B extends Build
|
||||
{
|
||||
lazy val dep = Project("dep", file("dep")) settings( baseSettings : _*) settings(
|
||||
organization := "org.example",
|
||||
version := "1.0",
|
||||
publishTo <<= baseDirectory in ThisBuild apply { base =>
|
||||
Some(Resolver.file("file", base / "repo")(Resolver.ivyStylePatterns))
|
||||
}
|
||||
)
|
||||
lazy val use = Project("use", file("use")) settings(baseSettings : _*) settings(
|
||||
libraryDependencies += "org.example" %% "dep" % "1.0",
|
||||
externalIvySettings(),
|
||||
publishTo <<= baseDirectory { base =>
|
||||
Some(Resolver.file("file", base / "repo")(Resolver.ivyStylePatterns))
|
||||
},
|
||||
TaskKey[Unit]("check") <<= baseDirectory map {base =>
|
||||
val inCache = ( (base / "target" / "use-cache") ** "*.jar").get
|
||||
assert(inCache.isEmpty, "Cache contained jars: " + inCache)
|
||||
}
|
||||
)
|
||||
lazy val baseSettings = Seq(
|
||||
autoScalaLibrary := false,
|
||||
ivyScala := None,
|
||||
unmanagedJars in Compile <++= scalaInstance map (_.allJars.toSeq),
|
||||
publishArtifact in packageSrc := false,
|
||||
publishArtifact in packageDoc := false,
|
||||
publishMavenStyle := false
|
||||
)
|
||||
}
|
||||
Loading…
Reference in New Issue