mirror of https://github.com/sbt/sbt.git
Make sure bare build.sbt is published by default.
This commit is contained in:
parent
f0732a8bd6
commit
d07cdb92ad
|
|
@ -58,10 +58,7 @@ object Build {
|
||||||
autoGeneratedProject := true
|
autoGeneratedProject := true
|
||||||
)
|
)
|
||||||
def defaultAggregatedProject(id: String, base: File, agg: Seq[ProjectRef]): Project =
|
def defaultAggregatedProject(id: String, base: File, agg: Seq[ProjectRef]): Project =
|
||||||
defaultProject(id, base).aggregate(agg: _*).settings(
|
defaultProject(id, base).aggregate(agg: _*)
|
||||||
Keys.publish := (),
|
|
||||||
Keys.publishLocal := ()
|
|
||||||
)
|
|
||||||
|
|
||||||
@deprecated("Use Attributed.data", "0.13.0")
|
@deprecated("Use Attributed.data", "0.13.0")
|
||||||
def data[T](in: Seq[Attributed[T]]): Seq[T] = Attributed.data(in)
|
def data[T](in: Seq[Attributed[T]]): Seq[T] = Attributed.data(in)
|
||||||
|
|
|
||||||
|
|
@ -585,7 +585,9 @@ object Load {
|
||||||
val existingIds = otherProjects.projects map (_.id)
|
val existingIds = otherProjects.projects map (_.id)
|
||||||
val refs = existingIds map (id => ProjectRef(buildUri, id))
|
val refs = existingIds map (id => ProjectRef(buildUri, id))
|
||||||
val defaultID = autoID(buildBase, context, existingIds)
|
val defaultID = autoID(buildBase, context, existingIds)
|
||||||
val root = finalizeProject(Build.defaultAggregatedProject(defaultID, buildBase, refs), files)
|
val root1 = Build.defaultAggregatedProject(defaultID, buildBase, refs)
|
||||||
|
val root2 = if (discovered.isEmpty) root1 else root1.settings(Keys.publish := (()), Keys.publishLocal := (()))
|
||||||
|
val root = finalizeProject(root2, files)
|
||||||
val result = root +: (acc ++ otherProjects.projects)
|
val result = root +: (acc ++ otherProjects.projects)
|
||||||
log.debug(s"[Loading] Done in ${buildBase}, returning: ${result.map(_.id).mkString("(", ", ", ")")}")
|
log.debug(s"[Loading] Done in ${buildBase}, returning: ${result.map(_.id).mkString("(", ", ", ")")}")
|
||||||
LoadedProjects(result, generated ++ otherGenerated ++ generatedConfigClassFiles)
|
LoadedProjects(result, generated ++ otherGenerated ++ generatedConfigClassFiles)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
organization := "com.example"
|
||||||
|
version := "0.1.0"
|
||||||
|
ivyPaths := new IvyPaths((baseDirectory in LocalRootProject).value, Some((target in LocalRootProject).value / "ivy-cache"))
|
||||||
|
|
@ -2,3 +2,9 @@
|
||||||
$ exists target/ivy-cache/local/com.example/app_2.10/0.1.0/poms/app_2.10.pom
|
$ exists target/ivy-cache/local/com.example/app_2.10/0.1.0/poms/app_2.10.pom
|
||||||
$ exists target/ivy-cache/local/com.example/app_2.10/0.1.0/jars/app_2.10.jar
|
$ exists target/ivy-cache/local/com.example/app_2.10/0.1.0/jars/app_2.10.jar
|
||||||
$ absent target/ivy-cache/local/com.example/default-root_2.10/0.1.0/ivys/ivy.xml
|
$ absent target/ivy-cache/local/com.example/default-root_2.10/0.1.0/ivys/ivy.xml
|
||||||
|
|
||||||
|
$ copy-file changes/bare.sbt build.sbt
|
||||||
|
> reload
|
||||||
|
> publishLocal
|
||||||
|
$ exists target/ivy-cache/local/com.example/artificial-root-no-publish_2.10/0.1.0/poms/artificial-root-no-publish_2.10.pom
|
||||||
|
$ exists target/ivy-cache/local/com.example/artificial-root-no-publish_2.10/0.1.0/jars/artificial-root-no-publish_2.10.jar
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue